001/*
002 * (C) Copyright 2006-2011 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 *
016 * Contributors:
017 *     Nuxeo - initial API and implementation
018 *
019 * $Id$
020 */
021
022package org.nuxeo.ecm.core.api.security;
023
024import org.nuxeo.runtime.api.login.LoginComponent;
025
026/**
027 * @author Bogdan Stefanescu
028 */
029// TODO: make it a constant utility class instead of an interface.
030public interface SecurityConstants {
031
032    static final String SYSTEM_USERNAME = LoginComponent.SYSTEM_USERNAME;
033
034    /**
035     * @deprecated administrator user names are configurable on user manager
036     */
037    @Deprecated
038    static final String ADMINISTRATOR = "Administrator";
039
040    /**
041     * @deprecated anonymous user name is configurable on user manager
042     */
043    @Deprecated
044    static final String ANONYMOUS = "anonymous";
045
046    /**
047     * @deprecated administrators groups are configurable on user manager
048     */
049    @Deprecated
050    static final String ADMINISTRATORS = "administrators";
051
052    /**
053     * @deprecated default group is configurable on user manager
054     */
055    @Deprecated
056    static final String MEMBERS = "members";
057
058    static final String EVERYONE = "Everyone";
059
060    static final String EVERYTHING = "Everything";
061
062    static final String RESTRICTED_READ = "RestrictedRead";
063
064    static final String READ = "Read";
065
066    static final String WRITE = "Write";
067
068    static final String READ_WRITE = "ReadWrite";
069
070    static final String REMOVE = "Remove";
071
072    static final String VERSION = "Version";
073
074    static final String READ_VERSION = "ReadVersion";
075
076    static final String WRITE_VERSION = "WriteVersion";
077
078    static final String BROWSE = "Browse";
079
080    static final String WRITE_SECURITY = "WriteSecurity";
081
082    static final String READ_SECURITY = "ReadSecurity";
083
084    static final String READ_PROPERTIES = "ReadProperties";
085
086    static final String WRITE_PROPERTIES = "WriteProperties";
087
088    static final String READ_CHILDREN = "ReadChildren";
089
090    static final String ADD_CHILDREN = "AddChildren";
091
092    static final String REMOVE_CHILDREN = "RemoveChildren";
093
094    static final String READ_LIFE_CYCLE = "ReadLifeCycle";
095
096    static final String WRITE_LIFE_CYCLE = "WriteLifeCycle";
097
098    static final String MANAGE_WORKFLOWS = "ManageWorkflows";
099
100    static final String VIEW_WORKLFOW = "ReviewParticipant";
101
102    static final String UNLOCK = "Unlock";
103
104    /**
105     * Flag that can be used as principal to mark an unsupported ACL.
106     */
107    static final String UNSUPPORTED_ACL = "_UNSUPPORTED_ACL_";
108
109}