| | |
| | |
|
| | | private final char[] password;
|
| | |
|
| | | private volatile boolean isAdmin;
|
| | | private volatile boolean allowManagement;
|
| | |
|
| | | private volatile boolean allowAdministration;
|
| | |
|
| | | private volatile ServerSettings settings;
|
| | |
|
| | |
| | | refreshRepositories();
|
| | |
|
| | | try {
|
| | | settings = RpcUtils.getSettings(url, account, password);
|
| | | status = RpcUtils.getStatus(url, account, password);
|
| | | refreshUsers();
|
| | | isAdmin = true;
|
| | | allowManagement = true;
|
| | | } catch (UnauthorizedException e) {
|
| | | } catch (ForbiddenException e) {
|
| | | } catch (IOException e) {
|
| | | System.err.println(e.getMessage());
|
| | | }
|
| | |
|
| | | try {
|
| | | settings = RpcUtils.getSettings(url, account, password);
|
| | | status = RpcUtils.getStatus(url, account, password);
|
| | | allowAdministration = true;
|
| | | } catch (UnauthorizedException e) {
|
| | | } catch (ForbiddenException e) {
|
| | | } catch (IOException e) {
|
| | | System.err.println(e.getMessage());
|
| | | }
|
| | |
|
| | | public boolean allowAdmin() {
|
| | | return isAdmin;
|
| | | }
|
| | |
|
| | | public boolean allowManagement() {
|
| | | return allowManagement;
|
| | | }
|
| | | |
| | | public boolean allowAdministration() {
|
| | | return allowAdministration;
|
| | | }
|
| | |
|
| | | public boolean isOwner(RepositoryModel model) {
|