1package org.apache.archiva.redback.authorization.open;
23/*4 * Copyright 2001-2006 The Apache Software Foundation.5 *6 * Licensed under the Apache License, Version 2.0 (the "License");7 * you may not use this file except in compliance with the License.8 * You may obtain a copy of the License at9 *10 * http://www.apache.org/licenses/LICENSE-2.011 *12 * Unless required by applicable law or agreed to in writing, software13 * distributed under the License is distributed on an "AS IS" BASIS,14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.15 * See the License for the specific language governing permissions and16 * limitations under the License.17 */1819import org.apache.archiva.redback.authorization.AuthorizationDataSource;
20import org.apache.archiva.redback.authorization.AuthorizationException;
21import org.apache.archiva.redback.authorization.AuthorizationResult;
22import org.apache.archiva.redback.authorization.Authorizer;
23import org.springframework.stereotype.Service;
2425/**26 * OpenAuthorizer - No checks for authorization, everything passes. 27 *28 * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>29 *30 * 31 */32 @Service("authorizer#open")
33publicclassOpenAuthorizer34implementsAuthorizer35 {
3637public String getId()
38 {
39return"open";
40 }
4142publicAuthorizationResult isAuthorized( AuthorizationDataSource source )
43throwsAuthorizationException44 {
45returnnewAuthorizationResult( true, source.getPermission(), null );
46 }
4748publicboolean isFinalImplementation()
49 {
50returntrue;
51 }
5253public String getDescriptionKey()
54 {
55return"archiva.redback.authorizer.open";
56 }
5758 }