| | |
| | |
|
| | | import com.gitblit.Constants;
|
| | | import com.gitblit.Constants.AccessRestrictionType;
|
| | | import com.gitblit.Constants.AuthorizationControl;
|
| | | import com.gitblit.GitBlitException.ForbiddenException;
|
| | | import com.gitblit.GitBlitException.NotAllowedException;
|
| | | import com.gitblit.GitBlitException.UnauthorizedException;
|
| | |
| | | return AccessRestrictionType.fromName(restriction);
|
| | | }
|
| | |
|
| | | public AuthorizationControl getDefaultAuthorizationControl() {
|
| | | String authorization = null;
|
| | | if (settings.hasKey(Keys.git.defaultAuthorizationControl)) {
|
| | | authorization = settings.get(Keys.git.defaultAuthorizationControl).currentValue;
|
| | | }
|
| | | return AuthorizationControl.fromName(authorization);
|
| | | }
|
| | |
|
| | | /**
|
| | | * Returns the list of pre-receive scripts the repository inherited from the
|
| | | * global settings and team affiliations.
|