-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added endpoint for a first version of the home inbox (GET /notification/user/{uuid}) - Added endpoints for getting user's assemblies, groups and ongoing campaigns - Added endpoints for getting user's profile - Updated access control rules - Fixed issues with authentication (logout redirect null exception) - Fixed and extended assemblies list endpoints - Added basic assembly search query - Extended Swagger documentation with more annotations so that the doc can be used for testing purposes
- Loading branch information
Showing
43 changed files
with
1,524 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
web: target/universal/stage/bin/appcivist-core -Dhttp.port=${PORT} -Ddb.default.driver=org.postgresql.Driver -Ddb.default.url=${DATABASE_URL} -Dconfig.resource=heroku.conf | ||
web: target/universal/stage/bin/appcivist-core -Dhttp.port=${PORT} -Ddb.default.driver=org.postgresql.Driver -Ddb.default.url=${DATABASE_URL} -Dconfig.resource=heroku.conf -Dlogger.file=conf/heroku.logback.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Security Annotations | ||
Annotations to use in Controllers to manage access control | ||
|
||
*Restrict to Role Groups* | ||
By using the following annotation on top of a Controller method, the corresponding endpoint is accessible only to | ||
users that have the list of ROLES specified in the list | ||
|
||
```java | ||
@Restrict(@Group(GlobalData.USER_ROLE)) // only those with the USER_ROLE | ||
@Restrict(@Group(GlobalData.USER_ROLE),@Group(GlobalData.ADMIN_ROLE)) // only those with the USER_ROLE or the ADMIN_ROLE | ||
@Restrict(@Group(GlobalData.USER_ROLE,GlobalData.ADMIN_ROLE)) // only those with the USER_ROLE AND ADMIN_ROLE | ||
``` | ||
|
||
*Dynamic Access Control* | ||
Refer to access rules that are more specific and are implemented by the DynamicResourceHandlers in the security package. | ||
You can use them via the following annotation, where value indicates which of the dynamic handlers to use (as they | ||
are defined in security.MyDynamicResourceHandler) : | ||
|
||
```java | ||
@Dynamic(value = "OnlyMe", meta = SecurityModelConstants.USER_RESOURCE_PATH) | ||
``` | ||
|
||
As of now, the following dynamic handlers are avaiable: | ||
|
||
* *MemberOfAssembly:* the user that sent the request is member of the assembly to which the resource belongs | ||
* *CoordinatorOfGroup:* the user that sent the request is coordinator of the working group to which the resource belongs | ||
* *CoordinatorOfAssembly:* the user that sent the request is member of the assembly to which the resource belongs | ||
* *CanInviteToGroup:* the user has permission to invite others to the group | ||
* *CanInviteToAssembly:* the user has permission to invete other to the assembly | ||
* *OnlyMeAndAdmin:* the request will be successful only if the requested is under the user's resource space or if he/she is ADMIN | ||
* *OnlyMe:* the request will be successful only if the requested is under the user's resource space |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.