| | |
| | | // and the permissions of teams of which the user belongs
|
| | | AccessPermission permission = AccessPermission.NONE;
|
| | | if (permissions.containsKey(repository.name.toLowerCase())) {
|
| | | // exact repository permission specified
|
| | | AccessPermission p = permissions.get(repository.name.toLowerCase());
|
| | | if (p != null) {
|
| | | permission = p;
|
| | | }
|
| | | } else {
|
| | | // search for regex permission match
|
| | | for (String key : permissions.keySet()) {
|
| | | if (repository.name.matches(key)) {
|
| | | AccessPermission p = permissions.get(key);
|
| | | if (p != null) {
|
| | | permission = p;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | for (TeamModel team : teams) {
|