Modified scopes

revert-70aa11f8
mharindu 8 years ago
parent acf6d7ecd7
commit 2e79dd290e

@ -77,7 +77,7 @@ public interface CertificateManagementAdminService {
message = "Internal Server Error. \n Server error occurred while adding certificates.", message = "Internal Server Error. \n Server error occurred while adding certificates.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "certificate:write", name = "Add certificates", description = "") @Scope(key = "certificate:manage", name = "Add certificates", description = "")
Response addCertificate( Response addCertificate(
@ApiParam( @ApiParam(
name = "enrollmentCertificates", name = "enrollmentCertificates",
@ -135,7 +135,7 @@ public interface CertificateManagementAdminService {
"Server error occurred while retrieving information requested certificate.", "Server error occurred while retrieving information requested certificate.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "certificate:read", name = "View certificates", description = "") @Scope(key = "certificate:view", name = "View certificates", description = "")
Response getCertificate( Response getCertificate(
@ApiParam(name = "serialNumber", @ApiParam(name = "serialNumber",
value = "Provide the serial number of the certificate that you wish to get the details of", value = "Provide the serial number of the certificate that you wish to get the details of",
@ -207,7 +207,7 @@ public interface CertificateManagementAdminService {
"Server error occurred while retrieving all certificates enrolled in the system.", "Server error occurred while retrieving all certificates enrolled in the system.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "certificate:read", name = "View certificates", description = "") @Scope(key = "certificate:view", name = "View certificates", description = "")
Response getAllCertificates( Response getAllCertificates(
@ApiParam( @ApiParam(
name = "offset", name = "offset",
@ -250,7 +250,7 @@ public interface CertificateManagementAdminService {
message = "Internal Server Error. \n " + message = "Internal Server Error. \n " +
"Server error occurred while removing the certificate.", "Server error occurred while removing the certificate.",
response = ErrorResponse.class)}) response = ErrorResponse.class)})
@Scope(key = "certificate:write", name = "Add certificates", description = "") @Scope(key = "certificate:manage", name = "Add certificates", description = "")
Response removeCertificate( Response removeCertificate(
@ApiParam( @ApiParam(
name = "serialNumber", name = "serialNumber",

@ -91,7 +91,7 @@ public interface ActivityInfoProviderService {
message = "Internal Server Error. \n Server error occurred while fetching activity data.", message = "Internal Server Error. \n Server error occurred while fetching activity data.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "activity:read", name = "View Activities", description = "") @Scope(key = "activity:view", name = "View Activities", description = "")
Response getActivity( Response getActivity(
@ApiParam( @ApiParam(
name = "id", name = "id",
@ -150,7 +150,7 @@ public interface ActivityInfoProviderService {
message = "Internal Server Error. \n Server error occurred while fetching activity data.", message = "Internal Server Error. \n Server error occurred while fetching activity data.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "activity:read", name = "View Activities", description = "") @Scope(key = "activity:view", name = "View Activities", description = "")
Response getActivities( Response getActivities(
@ApiParam( @ApiParam(
name = "since", name = "since",

@ -81,7 +81,7 @@ public interface ConfigurationManagementService {
"platform configuration.", "platform configuration.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "configuration:read", name = "View Configurations", description = "") @Scope(key = "configuration:view", name = "View Configurations", description = "")
Response getConfiguration( Response getConfiguration(
@ApiParam( @ApiParam(
name = "If-Modified-Since", name = "If-Modified-Since",

@ -91,7 +91,7 @@ public interface DeviceManagementService {
message = "Internal Server Error. \n Server error occurred while fetching the device list.", message = "Internal Server Error. \n Server error occurred while fetching the device list.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "device:read", name = "View Devices", description = "") @Scope(key = "device:view", name = "View Devices", description = "")
Response getDevices( Response getDevices(
@ApiParam( @ApiParam(
name = "name", name = "name",
@ -200,7 +200,7 @@ public interface DeviceManagementService {
"Server error occurred while retrieving information requested device.", "Server error occurred while retrieving information requested device.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "device:read", name = "View Devices", description = "") @Scope(key = "device:view", name = "View Devices", description = "")
Response getDevice( Response getDevice(
@ApiParam( @ApiParam(
name = "type", name = "type",
@ -280,7 +280,7 @@ public interface DeviceManagementService {
"Server error occurred while retrieving feature list of the device.", "Server error occurred while retrieving feature list of the device.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "device:read", name = "View Devices", description = "") @Scope(key = "device:view", name = "View Devices", description = "")
Response getFeaturesOfDevice( Response getFeaturesOfDevice(
@ApiParam( @ApiParam(
name = "type", name = "type",
@ -354,7 +354,7 @@ public interface DeviceManagementService {
"Server error occurred while enrolling the device.", "Server error occurred while enrolling the device.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "device:read", name = "View Devices", description = "") @Scope(key = "device:view", name = "View Devices", description = "")
Response searchDevices( Response searchDevices(
@ApiParam( @ApiParam(
name = "offset", name = "offset",
@ -433,7 +433,7 @@ public interface DeviceManagementService {
"Server error occurred while retrieving installed application list of the device.", "Server error occurred while retrieving installed application list of the device.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "device:read", name = "View Devices", description = "") @Scope(key = "device:view", name = "View Devices", description = "")
Response getInstalledApplications( Response getInstalledApplications(
@ApiParam( @ApiParam(
name = "type", name = "type",
@ -527,7 +527,7 @@ public interface DeviceManagementService {
"Server error occurred while retrieving operation list scheduled for the device.", "Server error occurred while retrieving operation list scheduled for the device.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "device:read", name = "View Devices", description = "") @Scope(key = "device:view", name = "View Devices", description = "")
Response getDeviceOperations( Response getDeviceOperations(
@ApiParam( @ApiParam(
name = "type", name = "type",
@ -623,7 +623,7 @@ public interface DeviceManagementService {
response = ErrorResponse.class) response = ErrorResponse.class)
} }
) )
@Scope(key = "device:read", name = "View Devices", description = "") @Scope(key = "device:view", name = "View Devices", description = "")
Response getEffectivePolicyOfDevice( Response getEffectivePolicyOfDevice(
@ApiParam( @ApiParam(
name = "type", name = "type",
@ -674,7 +674,7 @@ public interface DeviceManagementService {
response = ErrorResponse.class) response = ErrorResponse.class)
} }
) )
@Scope(key = "device:read", name = "View Devices", description = "") @Scope(key = "device:view", name = "View Devices", description = "")
Response getComplianceDataOfDevice( Response getComplianceDataOfDevice(
@ApiParam( @ApiParam(
name = "type", name = "type",

@ -88,7 +88,7 @@ public interface NotificationManagementService {
"\n Server error occurred while fetching the notification list.", "\n Server error occurred while fetching the notification list.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "notification:read", name = "View and manage notifications", description = "") @Scope(key = "notification:view", name = "View and manage notifications", description = "")
Response getNotifications( Response getNotifications(
@ApiParam( @ApiParam(
name = "status", name = "status",
@ -140,7 +140,7 @@ public interface NotificationManagementService {
message = "Error occurred while updating notification status.") message = "Error occurred while updating notification status.")
} }
) )
@Scope(key = "notification:read", name = "View and manage notifications", description = "") @Scope(key = "notification:view", name = "View and manage notifications", description = "")
Response updateNotificationStatus( Response updateNotificationStatus(
@ApiParam( @ApiParam(
name = "id", name = "id",

@ -99,7 +99,7 @@ public interface PolicyManagementService {
"Server error occurred while adding a new policy.", "Server error occurred while adding a new policy.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "policy:write", name = "Add policies", description = "") @Scope(key = "policy:manage", name = "Add policies", description = "")
Response addPolicy( Response addPolicy(
@ApiParam( @ApiParam(
name = "policy", name = "policy",
@ -153,7 +153,7 @@ public interface PolicyManagementService {
"policies."), "policies."),
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "policy:read", name = "Views policies", description = "") @Scope(key = "policy:view", name = "Views policies", description = "")
Response getPolicies( Response getPolicies(
@ApiParam( @ApiParam(
name = "If-Modified-Since", name = "If-Modified-Since",
@ -219,7 +219,7 @@ public interface PolicyManagementService {
"policy.", "policy.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "policy:read", name = "View policies", description = "") @Scope(key = "policy:view", name = "View policies", description = "")
Response getPolicy( Response getPolicy(
@ApiParam( @ApiParam(
name = "id", name = "id",
@ -283,7 +283,7 @@ public interface PolicyManagementService {
"Server error occurred while updating the policy.", "Server error occurred while updating the policy.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "policy:write", name = "Add policies", description = "") @Scope(key = "policy:manage", name = "Add policies", description = "")
Response updatePolicy( Response updatePolicy(
@ApiParam( @ApiParam(
name = "id", name = "id",
@ -329,7 +329,7 @@ public interface PolicyManagementService {
"Server error occurred while bulk removing policies.", "Server error occurred while bulk removing policies.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "policy:write", name = "Add policies", description = "") @Scope(key = "policy:manage", name = "Add policies", description = "")
Response removePolicies( Response removePolicies(
@ApiParam( @ApiParam(
name = "policyIds", name = "policyIds",
@ -365,7 +365,7 @@ public interface PolicyManagementService {
message = "ErrorResponse in activating policies.", message = "ErrorResponse in activating policies.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "policy:write", name = "Add policies", description = "") @Scope(key = "policy:manage", name = "Add policies", description = "")
Response activatePolicies( Response activatePolicies(
@ApiParam( @ApiParam(
name = "policyIds", name = "policyIds",
@ -401,7 +401,7 @@ public interface PolicyManagementService {
message = "ErrorResponse in deactivating policies.", message = "ErrorResponse in deactivating policies.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "policy:write", name = "Add policies", description = "") @Scope(key = "policy:manage", name = "Add policies", description = "")
Response deactivatePolicies( Response deactivatePolicies(
@ApiParam( @ApiParam(
name = "policyIds", name = "policyIds",
@ -434,7 +434,7 @@ public interface PolicyManagementService {
message = "ErrorResponse in deactivating policies.", message = "ErrorResponse in deactivating policies.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "policy:write", name = "Add policies", description = "") @Scope(key = "policy:manage", name = "Add policies", description = "")
Response applyChanges(); Response applyChanges();
@ -463,7 +463,7 @@ public interface PolicyManagementService {
message = "Exception in updating policy priorities.", message = "Exception in updating policy priorities.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "policy:write", name = "Add policies", description = "") @Scope(key = "policy:manage", name = "Add policies", description = "")
Response updatePolicyPriorities( Response updatePolicyPriorities(
@ApiParam( @ApiParam(
name = "priorityUpdatedPolicies", name = "priorityUpdatedPolicies",

@ -76,7 +76,7 @@ public interface RoleManagementService {
message = "Internal Server Error. \n Server error occurred while fetching requested list of roles.", message = "Internal Server Error. \n Server error occurred while fetching requested list of roles.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@org.wso2.carbon.apimgt.annotations.api.Scope(key = "role:read", name = "View roles", description = "") @org.wso2.carbon.apimgt.annotations.api.Scope(key = "role:view", name = "View roles", description = "")
Response getRoles( Response getRoles(
@ApiParam( @ApiParam(
name = "filter", name = "filter",
@ -158,7 +158,7 @@ public interface RoleManagementService {
message = "Internal Server ErrorResponse. \n Server error occurred while fetching the permission list of the requested role.", message = "Internal Server ErrorResponse. \n Server error occurred while fetching the permission list of the requested role.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@org.wso2.carbon.apimgt.annotations.api.Scope(key = "role:read", name = "View roles", description = "") @org.wso2.carbon.apimgt.annotations.api.Scope(key = "role:view", name = "View roles", description = "")
Response getScopes( Response getScopes(
@ApiParam( @ApiParam(
name = "If-Modified-Since", name = "If-Modified-Since",
@ -208,7 +208,7 @@ public interface RoleManagementService {
message = "Internal Server Error. \n Server error occurred while updating the scopes.", message = "Internal Server Error. \n Server error occurred while updating the scopes.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@org.wso2.carbon.apimgt.annotations.api.Scope(key = "role:add", name = "Add roles", description = "") @org.wso2.carbon.apimgt.annotations.api.Scope(key = "role:manage", name = "Add roles", description = "")
Response updateScopes( Response updateScopes(
@ApiParam( @ApiParam(
name = "Scopes", name = "Scopes",
@ -265,7 +265,7 @@ public interface RoleManagementService {
"requested role.", "requested role.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@org.wso2.carbon.apimgt.annotations.api.Scope(key = "role:read", name = "View roles", description = "") @org.wso2.carbon.apimgt.annotations.api.Scope(key = "role:view", name = "View roles", description = "")
Response getRole( Response getRole(
@ApiParam( @ApiParam(
name = "roleName", name = "roleName",
@ -325,7 +325,7 @@ public interface RoleManagementService {
message = "Internal Server Error. \n Server error occurred while adding a new role.", message = "Internal Server Error. \n Server error occurred while adding a new role.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@org.wso2.carbon.apimgt.annotations.api.Scope(key = "role:add", name = "Add roles", description = "") @org.wso2.carbon.apimgt.annotations.api.Scope(key = "role:manage", name = "Add roles", description = "")
Response addRole( Response addRole(
@ApiParam( @ApiParam(
name = "role", name = "role",
@ -375,7 +375,7 @@ public interface RoleManagementService {
message = "Internal Server Error. \n Server error occurred while updating the role.", message = "Internal Server Error. \n Server error occurred while updating the role.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@org.wso2.carbon.apimgt.annotations.api.Scope(key = "role:add", name = "Add roles", description = "") @org.wso2.carbon.apimgt.annotations.api.Scope(key = "role:manage", name = "Add roles", description = "")
Response updateRole( Response updateRole(
@ApiParam( @ApiParam(
name = "roleName", name = "roleName",
@ -412,7 +412,7 @@ public interface RoleManagementService {
message = "Internal Server Error. \n Server error occurred while removing the role.", message = "Internal Server Error. \n Server error occurred while removing the role.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@org.wso2.carbon.apimgt.annotations.api.Scope(key = "role:add", name = "Add roles", description = "") @org.wso2.carbon.apimgt.annotations.api.Scope(key = "role:manage", name = "Add roles", description = "")
Response deleteRole( Response deleteRole(
@ApiParam( @ApiParam(
name = "roleName", name = "roleName",
@ -474,7 +474,7 @@ public interface RoleManagementService {
"Server error occurred while updating the user list of the role.", "Server error occurred while updating the user list of the role.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@org.wso2.carbon.apimgt.annotations.api.Scope(key = "role:add", name = "Add roles", description = "") @org.wso2.carbon.apimgt.annotations.api.Scope(key = "role:manage", name = "Add roles", description = "")
Response updateUsersOfRole( Response updateUsersOfRole(
@ApiParam( @ApiParam(
name = "roleName", name = "roleName",

@ -83,7 +83,7 @@ public interface UserManagementService {
message = "Internal Server Error. \n Server error occurred while adding a new user.", message = "Internal Server Error. \n Server error occurred while adding a new user.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "user:write", name = "Add users", description = "") @Scope(key = "user:manage", name = "Add users", description = "")
Response addUser( Response addUser(
@ApiParam( @ApiParam(
name = "user", name = "user",
@ -135,7 +135,7 @@ public interface UserManagementService {
" fetching the requested user.", " fetching the requested user.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "user:read", name = "View users", description = "") @Scope(key = "user:view", name = "View users", description = "")
Response getUser( Response getUser(
@ApiParam( @ApiParam(
name = "username", name = "username",
@ -192,7 +192,7 @@ public interface UserManagementService {
"Server error occurred while updating the user.", "Server error occurred while updating the user.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "user:write", name = "Add users", description = "") @Scope(key = "user:manage", name = "Add users", description = "")
Response updateUser( Response updateUser(
@ApiParam( @ApiParam(
name = "username", name = "username",
@ -227,7 +227,7 @@ public interface UserManagementService {
response = ErrorResponse.class response = ErrorResponse.class
) )
}) })
@Scope(key = "user:write", name = "Add users", description = "") @Scope(key = "user:manage", name = "Add users", description = "")
Response removeUser( Response removeUser(
@ApiParam(name = "username", value = "Username of the user to be deleted.", required = true) @ApiParam(name = "username", value = "Username of the user to be deleted.", required = true)
@PathParam("username") String username); @PathParam("username") String username);
@ -276,7 +276,7 @@ public interface UserManagementService {
" assigned to the user.", " assigned to the user.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "user:read", name = "View users", description = "") @Scope(key = "user:view", name = "View users", description = "")
Response getRolesOfUser( Response getRolesOfUser(
@ApiParam(name = "username", value = "Username of the user.", required = true) @ApiParam(name = "username", value = "Username of the user.", required = true)
@PathParam("username") String username); @PathParam("username") String username);
@ -319,7 +319,7 @@ public interface UserManagementService {
message = "Internal Server Error. \n Server error occurred while fetching the user list.", message = "Internal Server Error. \n Server error occurred while fetching the user list.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "user:read", name = "View users", description = "") @Scope(key = "user:view", name = "View users", description = "")
Response getUsers( Response getUsers(
@ApiParam( @ApiParam(
name = "filter", name = "filter",
@ -386,7 +386,7 @@ public interface UserManagementService {
"list that matches the given filter.", "list that matches the given filter.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "user:read", name = "View users", description = "") @Scope(key = "user:view", name = "View users", description = "")
Response getUserNames( Response getUserNames(
@ApiParam( @ApiParam(
name = "filter", name = "filter",
@ -440,7 +440,7 @@ public interface UserManagementService {
"Server error occurred while updating credentials of the user.", "Server error occurred while updating credentials of the user.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "user:read", name = "View users", description = "") @Scope(key = "user:view", name = "View users", description = "")
Response resetPassword( Response resetPassword(
@ApiParam( @ApiParam(
name = "username", name = "username",
@ -483,7 +483,7 @@ public interface UserManagementService {
"Server error occurred while updating credentials of the user.", "Server error occurred while updating credentials of the user.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "user:write", name = "Add users", description = "") @Scope(key = "user:manage", name = "Add users", description = "")
Response inviteExistingUsersToEnrollDevice( Response inviteExistingUsersToEnrollDevice(
@ApiParam( @ApiParam(
name = "users", name = "users",

@ -84,7 +84,7 @@ public interface DeviceManagementAdminService {
message = "Internal Server Error. \n Server error occurred while fetching the device list.", message = "Internal Server Error. \n Server error occurred while fetching the device list.",
response = ErrorResponse.class) response = ErrorResponse.class)
}) })
@Scope(key = "device:admin:read", name = "View Devices", description = "") @Scope(key = "device:admin:view", name = "View Devices", description = "")
Response getDevicesByName( Response getDevicesByName(
@ApiParam( @ApiParam(
name = "name", name = "name",

@ -78,7 +78,7 @@ public interface DeviceTypeManagementService {
response = ErrorResponse.class) response = ErrorResponse.class)
} }
) )
@Scope(key = "device-type:admin:read", name = "View device types", description = "") @Scope(key = "device-type:admin:view", name = "View device types", description = "")
Response getDeviceTypes( Response getDeviceTypes(
@ApiParam( @ApiParam(
name = "If-Modified-Since", name = "If-Modified-Since",

Loading…
Cancel
Save