001/*
002 * Licensed under the Apache License, Version 2.0 (the "License");
003 * you may not use this file except in compliance with the License.
004 * You may obtain a copy of the License at
005 *
006 *     http://www.apache.org/licenses/LICENSE-2.0
007 *
008 * Unless required by applicable law or agreed to in writing, software
009 * distributed under the License is distributed on an "AS IS" BASIS,
010 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
011 * See the License for the specific language governing permissions and
012 * limitations under the License.
013 */
014package org.gbif.ws.security;
015
016/**
017 * Simple utils class to expose the API user role enumeration also as static strings required by the
018 * JSR 250 annotations. Unit tests makes sure these are indeed the same.
019 */
020public class UserRoles {
021
022  private UserRoles() {}
023
024  // UserRole.REGISTRY_ADMIN.name();
025  public static final String ADMIN_ROLE = "REGISTRY_ADMIN";
026  // UserRole.REGISTRY_EDITOR.name();
027  public static final String EDITOR_ROLE = "REGISTRY_EDITOR";
028
029  public static final String USER_ROLE = "USER";
030
031  public static final String APP_ROLE = "APP";
032
033  public static final String IPT_ROLE = "IPT";
034
035  public static final String GRSCICOLL_ADMIN_ROLE = "GRSCICOLL_ADMIN";
036
037  public static final String GRSCICOLL_EDITOR_ROLE = "GRSCICOLL_EDITOR";
038
039  public static final String GRSCICOLL_MEDIATOR_ROLE = "GRSCICOLL_MEDIATOR";
040
041  @Deprecated public static final String IDIGBIO_GRSCICOLL_EDITOR_ROLE = "IDIGBIO_GRSCICOLL_EDITOR";
042}