@Component public class Authz extends Object
| Constructor and Description | 
|---|
Authz(UserRepository userRepo)  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
hasAdminAccess(OneOpsTeam team,
              AppGroup appGroup)
Checks if the given team is a 'secret-admin' and has access to manage design and transition for
 the given application group. 
 | 
boolean | 
isAuthorized(String appName,
            OneOpsUser user)
Checks if  
OneOpsUser is authorized to manage secrets for the given application group. | 
public Authz(UserRepository userRepo)
public boolean isAuthorized(@Nonnull String appName, @Nonnull OneOpsUser user)
OneOpsUser is authorized to manage secrets for the given application group.
 Env nspath is used as the application group with the {org}_{assembly}_{env} format.appName - Application name.user - Authenticated user.true if the user is authorized.public boolean hasAdminAccess(OneOpsTeam team, AppGroup appGroup)
team - OneOps teamappGroup - Application grouptrue if the team has admin access.Copyright © 2018 Walmart, Inc.. All rights reserved.