Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-jams
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-jams
Commits
c0fef574
Commit
c0fef574
authored
4 years ago
by
William Enright
Committed by
Adrien Béraud
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixed blueprint search query
Change-Id: I7f0b808af3edbae80d95a068021a4f7f0b32e37e
parent
0649040f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
jams-server/src/main/java/net/jami/jams/server/servlets/api/admin/group/PolicyServlet.java
+15
-7
15 additions, 7 deletions
...i/jams/server/servlets/api/admin/group/PolicyServlet.java
with
15 additions
and
7 deletions
jams-server/src/main/java/net/jami/jams/server/servlets/api/admin/group/PolicyServlet.java
+
15
−
7
View file @
c0fef574
...
...
@@ -25,14 +25,22 @@ public class PolicyServlet extends HttpServlet {
@Override
@ScopedServletMethod
(
securityGroups
=
{
AccessLevel
.
ADMIN
})
protected
void
doGet
(
HttpServletRequest
req
,
HttpServletResponse
resp
)
throws
ServletException
,
IOException
{
StatementList
statementList
=
new
StatementList
();
StatementElement
st1
=
new
StatementElement
(
"groupName"
,
"="
,
req
.
getParameter
(
"groupName"
),
""
);
statementList
.
addStatement
(
st1
);
List
<
Policy
>
policies
=
dataStore
.
getPolicyDao
().
getObjects
(
statementList
);
if
(!
policies
.
isEmpty
())
resp
.
getOutputStream
().
write
(
JsonStream
.
serialize
(
policies
.
get
(
0
)).
getBytes
());
else
List
<
Group
>
policies
;
Policy
singlePolicy
;
if
(!
req
.
getParameter
(
"groupName"
).
equals
(
"*"
))
{
StatementList
statementList
=
new
StatementList
();
StatementElement
st
=
new
StatementElement
(
"groupName"
,
"="
,
req
.
getParameter
(
"groupName"
),
""
);
statementList
.
addStatement
(
st
);
resp
.
getOutputStream
().
write
(
JsonStream
.
serialize
(
dataStore
.
getPolicyDao
().
getObjects
(
statementList
).
get
(
0
)).
getBytes
());
resp
.
setStatus
(
200
);
}
else
{
policies
=
dataStore
.
getGroupDao
().
getObjects
(
null
);
resp
.
getOutputStream
().
write
(
JsonStream
.
serialize
(
policies
).
getBytes
());
resp
.
setStatus
(
200
);
}
}
@Override
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment