Interface PermissionService


@Path("/security") @Consumes({"application/xml","application/json"}) @Produces({"application/xml","application/json"}) public interface PermissionService
Manages permissions in XL Deploy.
  • Method Details

    • getGrantedPermissions

      @GET @Path("granted-permissions/{role}") Map<String,Collection<String>> getGrantedPermissions(@PathParam("role") String role)
      Gets all the permissions granted to a role.
      Parameters:
      role - the role to get the permissions for.
      Returns:
      a Map of configuration item ids to permissions granted to the user.
      Permission:
      security#edit
    • getGrantedPermissionsById

      @GET @Path("granted-permissions/id/{roleId}") Map<String,Collection<String>> getGrantedPermissionsById(@PathParam("roleId") String roleId)
      Gets all the permissions granted to a role.
      Parameters:
      roleId - the role to get the permissions for.
      Returns:
      a Map of configuration item ids to permissions granted to the user.
      Permission:
      security#edit
    • getMyGrantedPermissions

      @GET @Path("granted-permissions") Map<String,Collection<String>> getMyGrantedPermissions()
      Gets all the permissions granted to the logged in user.
      Returns:
      a Map of configuration item ids to permissions granted the currently logged in user.
    • isGranted

      @GET @Path("permission/{permission}/{role}/{id:.+}") boolean isGranted(@PathParam("permission") String permission, @PathParam("id") String id, @PathParam("role") String role)
      Checks if a permission is granted to a role on a CI.
      Parameters:
      permission - the name of the permission to check.
      id - the path of the CI to check the permission on.
      role - the role to which the permission should be granted.
      Returns:
      true if granted.
      Permission:
      security#edit
    • isGranted

      @GET @Path("permission/{permission}/{role}") default boolean isGranted(@PathParam("permission") String permission, @PathParam("role") String role)
      Checks if a permission is granted to a role on a CI.
      Parameters:
      permission - the name of the permission to check.
      role - the role to which the permission should be granted.
      Returns:
      true if granted.
      Permission:
      security#edit
    • grant

      @PUT @Path("permission/{permission}/{role}/{id:.*}") void grant(@PathParam("permission") String permission, @PathParam("id") String id, @PathParam("role") String role)
      Grants a permission to a role on a CI.
      Parameters:
      permission - the name of the permission to grant.
      id - the path of the CI to grant the permission on.
      role - the role to which the permission should be granted.
      Permission:
      security#edit
    • grant

      @PUT @Path("permission/{permission}/{role}") default void grant(@PathParam("permission") String permission, @PathParam("role") String role)
      Grants a permission to a role on a CI.
      Parameters:
      permission - the name of the permission to grant.
      role - the role to which the permission should be granted.
      Permission:
      security#edit
    • revoke

      @DELETE @Path("permission/{permission}/{role}/{id:.+}") void revoke(@PathParam("permission") String permission, @PathParam("id") String id, @PathParam("role") String role)
      Revokes the permission of a role on a CI.
      Parameters:
      permission - the name of the permission to revoke.
      id - the path of the CI to revoke the permission from.
      role - the role from which the permission should be revoked.
      Permission:
      security#edit
    • revoke

      @DELETE @Path("permission/{permission}/{role}") default void revoke(@PathParam("permission") String permission, @PathParam("role") String role)
      Revokes the permission of a role on a CI.
      Parameters:
      permission - the name of the permission to revoke.
      role - the role from which the permission should be revoked.
      Permission:
      security#edit
    • isGrantedToMe

      @GET @Path("check/{permission}/{id:.+}") boolean isGrantedToMe(@PathParam("permission") String permission, @PathParam("id") String id)
      Checks if the currently logged in user has a certain permission on a CI.
      Parameters:
      permission - the name of the permission to check.
      id - the path of the CI to check the permission on.
      Returns:
      true if the user has this permission; false otherwise.
    • isGrantedToMe

      @GET @Path("check/{permission}") default boolean isGrantedToMe(@PathParam("permission") String permission)
      Checks if the currently logged in user has a certain permission on a CI.
      Parameters:
      permission - the name of the permission to check.
      Returns:
      true if the user has this permission; false otherwise.
    • updatePermissions

      @PUT @Path("roles/{id:.+}/permissions") void updatePermissions(@PathParam("id") String id, List<EditRolePermissionsDto> roles)