1 package org.apache.archiva.security.common;
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";
67 public static final String OPERATION_FILE_UPLOAD = "archiva-upload-file";
69 public static final String OPERATION_REPOSITORY_DELETE = "archiva-delete-artifact";
71 public static final String OPERATION_MERGE_REPOSITORY = "archiva-merge-repository";
73 public static final String OPERATION_VIEW_AUDIT_LOG = "archiva-view-audit-logs";
76 public static final String TEMPLATE_REPOSITORY_MANAGER = "archiva-repository-manager";
78 public static final String TEMPLATE_REPOSITORY_OBSERVER = "archiva-repository-observer";
80 public static final String TEMPLATE_GLOBAL_REPOSITORY_OBSERVER = "archiva-global-repository-observer";
82 public static final String TEMPLATE_SYSTEM_ADMIN = "archiva-system-administrator";
84 public static final String TEMPLATE_GUEST = "archiva-guest";
86 public static String toRepositoryObserverRoleName( String repoId )
88 return REPOSITORY_OBSERVER_ROLE_PREFIX + " - " + repoId;