mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 16:35:45 +01:00
added AdminSecurityFilter
This commit is contained in:
@@ -99,9 +99,20 @@ public class ConfigurationResource
|
||||
*/
|
||||
@GET
|
||||
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
|
||||
public ScmConfiguration getConfiguration()
|
||||
public Response getConfiguration()
|
||||
{
|
||||
return configuration;
|
||||
Response response = null;
|
||||
|
||||
if (SecurityUtil.isAdmin(securityContextProvider))
|
||||
{
|
||||
response = Response.ok(configuration).build();
|
||||
}
|
||||
else
|
||||
{
|
||||
response = Response.status(Response.Status.FORBIDDEN).build();
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
//~--- set methods ----------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user