Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Sang D NGO
linagora.esn.most
Commits
c9e25b66
Commit
c9e25b66
authored
Apr 16, 2018
by
Sang D NGO
Browse files
only admin can view all proposal
parent
37b37b76
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
backend/webserver/api/proposals/controller.js
backend/webserver/api/proposals/controller.js
+1
-1
frontend/app/common/most-proposal-api-client.service.js
frontend/app/common/most-proposal-api-client.service.js
+8
-1
No files found.
backend/webserver/api/proposals/controller.js
View file @
c9e25b66
...
...
@@ -37,7 +37,7 @@ module.exports = function(dependencies, lib) {
function
getProposals
(
req
,
res
)
{
var
listOptions
=
{
creator
:
req
.
user
.
id
,
creator
:
req
.
query
.
creator
,
type
:
req
.
query
.
type
,
status
:
req
.
query
.
status
,
limit
:
Number
(
req
.
query
.
limit
),
...
...
frontend/app/common/most-proposal-api-client.service.js
View file @
c9e25b66
...
...
@@ -6,7 +6,10 @@
var
API_PATH
=
'
proposals
'
;
function
mostProposalApiClient
(
mostRestangular
)
{
function
mostProposalApiClient
(
session
,
mostRestangular
)
{
return
{
createProposal
:
createProposal
,
getProposals
:
getProposals
,
...
...
@@ -19,6 +22,10 @@
}
function
getProposals
(
options
)
{
if
(
!
session
.
userIsDomainAdministrator
())
{
options
.
creator
=
session
.
user
.
_id
;
}
return
mostRestangular
.
all
(
API_PATH
).
getList
(
options
).
then
(
_stripAndReturnData
).
then
(
function
(
proposals
)
{
return
proposals
.
map
(
_decodeFormData
);
});
...
...
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