| | |
| | | // Permissions
|
| | | if (role.equalsIgnoreCase(Constants.ADMIN_ROLE)) {
|
| | | model.canAdmin = true;
|
| | | } else if (role.equalsIgnoreCase(Constants.FORK_ROLE)) {
|
| | | model.canFork = true;
|
| | | } else if (role.equalsIgnoreCase(Constants.CREATE_ROLE)) {
|
| | | model.canCreate = true;
|
| | | } else if (role.equalsIgnoreCase(Constants.NOT_FEDERATED_ROLE)) {
|
| | | model.excludeFromFederation = true;
|
| | | }
|
| | |
| | | if (model.canAdmin) {
|
| | | roles.add(Constants.ADMIN_ROLE);
|
| | | }
|
| | | if (model.canFork) {
|
| | | roles.add(Constants.FORK_ROLE);
|
| | | }
|
| | | if (model.canCreate) {
|
| | | roles.add(Constants.CREATE_ROLE);
|
| | | }
|
| | | if (model.excludeFromFederation) {
|
| | | roles.add(Constants.NOT_FEDERATED_ROLE);
|
| | | }
|