1 package org.apache.maven.archiva.security;
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
22 public class ArchivaRoleConstants
24 public static final String DELIMITER = " - ";
27 public static final String SYSTEM_ADMINISTRATOR_ROLE = "System Administrator";
29 public static final String USER_ADMINISTRATOR_ROLE = "User Administrator";
31 public static final String GLOBAL_REPOSITORY_MANAGER_ROLE = "Global Repository Manager";
33 public static final String GLOBAL_REPOSITORY_OBSERVER_ROLE = "Global Repository Observer";
35 public static final String REGISTERED_USER_ROLE = "Registered User";
37 public static final String GUEST_ROLE = "Guest";
39 // dynamic role prefixes
40 public static final String REPOSITORY_MANAGER_ROLE_PREFIX = "Repository Manager";
42 public static final String REPOSITORY_OBSERVER_ROLE_PREFIX = "Repository Observer";
45 public static final String OPERATION_MANAGE_USERS = "archiva-manage-users";
47 public static final String OPERATION_MANAGE_CONFIGURATION = "archiva-manage-configuration";
49 public static final String OPERATION_ACTIVE_GUEST = "archiva-guest";
51 public static final String OPERATION_RUN_INDEXER = "archiva-run-indexer";
53 public static final String OPERATION_REGENERATE_INDEX = "archiva-regenerate-index";
55 public static final String OPERATION_ACCESS_REPORT = "archiva-access-reports";
57 public static final String OPERATION_ADD_REPOSITORY = "archiva-add-repository";
59 public static final String OPERATION_REPOSITORY_ACCESS = "archiva-read-repository";
61 public static final String OPERATION_DELETE_REPOSITORY = "archiva-delete-repository";
63 public static final String OPERATION_EDIT_REPOSITORY = "archiva-edit-repository";
65 public static final String OPERATION_REPOSITORY_UPLOAD = "archiva-upload-repository";
68 public static final String TEMPLATE_REPOSITORY_MANAGER = "archiva-repository-manager";
70 public static final String TEMPLATE_REPOSITORY_OBSERVER = "archiva-repository-observer";
72 public static final String TEMPLATE_GLOBAL_REPOSITORY_OBSERVER = "archiva-global-repository-observer";
74 public static final String TEMPLATE_SYSTEM_ADMIN = "archiva-system-administrator";
76 public static final String TEMPLATE_GUEST = "archiva-guest";
78 public static String toRepositoryObserverRoleName( String repoId )
80 return REPOSITORY_OBSERVER_ROLE_PREFIX + " - " + repoId;