Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pisns-forum-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
scrmGroup
pisns-forum-api
Commits
bf0244cc
Commit
bf0244cc
authored
Mar 25, 2015
by
张淼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
d25dd9cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
forumRolePermission.js
app/controllers/admin/forumRolePermission.js
+1
-1
forumThread.js
app/controllers/mobile/forumThread.js
+4
-1
No files found.
app/controllers/admin/forumRolePermission.js
View file @
bf0244cc
...
...
@@ -169,7 +169,7 @@ router.get('/rolePermiss/list', function(req, res, next) {
var
pageNo
=
req
.
query
.
pageNo
||
1
;
var
pageSize
=
req
.
query
.
pageSize
||
10
;
console
.
log
(
req
.
session
);
forumRolePermissionService
.
getAllRolePermission
(
req
.
session
.
user
.
ent_code
,
pageNo
,
pageSize
,
function
(
err
,
docs
){
if
(
err
){
res
.
json
(
returnCode
.
BUSY
);
...
...
app/controllers/mobile/forumThread.js
View file @
bf0244cc
...
...
@@ -333,10 +333,12 @@ router.post('/thread/:tid/comment/create', function(req, res, next) {
var
integral
=
req
.
session
.
openUser
.
integral
||
0
;
var
exp
=
req
.
session
.
openUser
.
exp
||
0
;
var
destination
=
req
.
body
.
destination
||
'1'
;
console
.
log
(
'===========integral:'
+
integral
);
console
.
log
(
'===========exp:'
+
exp
);
//1.检查是否有权限
forumRolePermissionService
.
checkRolePermiss
(
req
.
session
.
user
.
ent_code
,
'comment'
,
integral
,
exp
,
function
(
err
,
result
){
if
(
err
){
console
.
error
(
err
);
res
.
json
(
returnCode
.
BUSY
);
}
else
{
if
(
result
){
//有操作权限
...
...
@@ -447,6 +449,7 @@ router.post('/thread/:tid/comment/create', function(req, res, next) {
res
.
json
(
returnCode
.
WRONG_PARAM
);
}
}
else
{
console
.
log
(
'no permiss'
);
res
.
json
(
returnCode
.
ACTION_NOT_PERMISSION
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment