public class SystemConfig extends Object
ISystemPrincipal
s. Modifier and Type | Method and Description |
---|---|
SystemPrincipal |
addSystemPrincipal(String configID,
IPrincipal principal,
String[] permissions,
boolean canChangePermissions,
boolean hasServiceAcls,
boolean isLockBreaker,
boolean canChangeSystemProperties,
boolean isAudited)
create a new system principal with the given id for the given principal
with the permissions specified.
|
SystemPrincipal |
addSystemPrincipal(String configID,
com.sapportals.portal.security.usermanagement.IUMPrincipal principal,
String[] permissions,
boolean canChangePermissions,
boolean hasServiceAcls,
boolean isLockBreaker,
boolean canChangeSystemProperties)
Deprecated.
As of NetWeaver 7.1, replaced by
addSystemPrincipal(String,com.sap.security.api.IPrincipal,String[],boolean,boolean,boolean,boolean,boolean) |
boolean |
canChangePermissions(IPrincipal principal)
Check, if a given principal is a system principal which is authorized
to change permissions.
|
boolean |
canChangePermissions(com.sapportals.portal.security.usermanagement.IUMPrincipal principal)
Deprecated.
As of NetWeaver 7.1, replaced by
canChangePermissions(com.sap.security.api.IPrincipal) |
boolean |
canChangeSystemProperties(IPrincipal principal)
Check, if a given principal is a system principal which is authorized
to set system properties.
|
static SystemConfig |
getInstance()
Get an instance of the
SystemConfig (singleton). |
ISystemPrincipalList |
getSystemGroups()
Deprecated.
As of NetWeaver 7.1, please use getSystemPrincipals() instead
|
ISystemPrincipalList |
getSystemPrincipals()
Get a list of all system principals (users, groups and roles).
|
ISystemPrincipalList |
getSystemRoles()
Deprecated.
As of NetWeaver 7.1, please use getSystemPrincipals() instead
|
ISystemPrincipalList |
getSystemUsers()
Deprecated.
As of NetWeaver 7.1, please use getSystemPrincipals() instead
|
boolean |
hasPermission(com.sapportals.portal.security.usermanagement.IUser user,
String permission)
Deprecated.
As of NetWeaver 7.1, replaced by
hasPermission(com.sap.security.api.IUser,String) |
boolean |
hasPermission(IUser user,
String permission)
Check if a given user is a system principal and has the requested
permission.
|
boolean |
hasPermissions(com.sapportals.portal.security.usermanagement.IUser user,
String[] permissions)
Deprecated.
As of NetWeaver 7.1, replaced by
hasPermissions(com.sap.security.api.IUser,String[]) |
boolean |
hasPermissions(IUser user,
String[] permissions)
Check if a given user is a system principal and has the requested
permissions (mass call for
hasPermissions(IUser, String[]) ). |
boolean |
hasServiceAcls(IPrincipal principal)
Check, if a given principal has all service acls.
|
boolean |
hasServiceAcls(com.sapportals.portal.security.usermanagement.IUMPrincipal principal)
Deprecated.
As of NetWeaver 7.1, replaced by
hasServiceAcls(com.sap.security.api.IPrincipal) |
boolean |
isAudited(com.sapportals.portal.security.usermanagement.IUser user)
Check if actions of a given principal should be audited.
|
boolean |
isLockBreaker(IUser user)
Check, if a given user is a system principal, which is authorized to break
the lock of another user.
|
public static SystemConfig getInstance() throws Exception
SystemConfig
(singleton).SystemConfig
Exception
- Exception raised in failure situationpublic ISystemPrincipalList getSystemUsers()
public ISystemPrincipalList getSystemGroups()
public ISystemPrincipalList getSystemRoles()
public ISystemPrincipalList getSystemPrincipals()
public boolean isAudited(com.sapportals.portal.security.usermanagement.IUser user)
user
- the IUser
to checktrue
if actions of the user should be audited,
false
otherwisepublic boolean hasPermission(com.sapportals.portal.security.usermanagement.IUser user, String permission)
hasPermission(com.sap.security.api.IUser,String)
user
- the IUser
to checkpermission
- the String
with the requested
permission's nametrue
if the user is a system principal and
has the specified permissionpublic boolean hasPermission(IUser user, String permission)
user
- the IUser
to checkpermission
- the String
with the requested
permission's nametrue
if the user is a system principal and
has the specified permissionpublic boolean hasPermissions(com.sapportals.portal.security.usermanagement.IUser user, String[] permissions)
hasPermissions(com.sap.security.api.IUser,String[])
hasPermissions(IUser, String[])
).user
- the IUser
to checkpermissions
- an array of String
s with the requested
permissions' nametrue
if the user is a system principal and
has all the specified permissionspublic boolean hasPermissions(IUser user, String[] permissions)
hasPermissions(IUser, String[])
).user
- the IUser
to checkpermissions
- an array of String
s with the requested
permissions' nametrue
if the user is a system principal and
has all the specified permissionspublic boolean canChangePermissions(com.sapportals.portal.security.usermanagement.IUMPrincipal principal)
canChangePermissions(com.sap.security.api.IPrincipal)
principal
- the IUMPrincipal
to checktrue
if the user is a system principal which is
authorized to change permissions.public boolean canChangePermissions(IPrincipal principal) throws UMException
principal
- the IUMPrincipal
to checktrue
if the user is a system principal which is
authorized to change permissions.UMException
- exceptionpublic boolean canChangeSystemProperties(IPrincipal principal) throws UMException
principal
- the IUMPrincipal
to checktrue
if the user is a system principal which is
authorized to set system properties.UMException
- exceptionpublic boolean hasServiceAcls(com.sapportals.portal.security.usermanagement.IUMPrincipal principal)
hasServiceAcls(com.sap.security.api.IPrincipal)
principal
- the IUMPrincipal
to checktrue
if the user is a system principal which is
authorized to all service acls.public boolean hasServiceAcls(IPrincipal principal) throws UMException
principal
- the IUMPrincipal
to checktrue
if the user is a system principal which is
authorized to all service acls.UMException
- exceptionpublic SystemPrincipal addSystemPrincipal(String configID, com.sapportals.portal.security.usermanagement.IUMPrincipal principal, String[] permissions, boolean canChangePermissions, boolean hasServiceAcls, boolean isLockBreaker, boolean canChangeSystemProperties) throws Exception
addSystemPrincipal(String,com.sap.security.api.IPrincipal,String[],boolean,boolean,boolean,boolean,boolean)
configID
- the id for the system principal to use in the configprincipal
- the IUMPrincipal
to create a system principal
config entry forpermissions
- an array of permissions that are to be granted to
the system principalcanChangePermissions
- the value for the system principal's
change_permissions
flagisLockBreaker
- the value for the system principal's
lock_breaker
flaghasServiceAcls
- the value for the system principal's
serviceacls
flagcanChangeSystemProperties
- the value for the system principal's
set_systemproperties
flagException
- if the configID or principal is empty, or if the
given configID already existspublic SystemPrincipal addSystemPrincipal(String configID, IPrincipal principal, String[] permissions, boolean canChangePermissions, boolean hasServiceAcls, boolean isLockBreaker, boolean canChangeSystemProperties, boolean isAudited) throws Exception
configID
- the id for the system principal to use in the configprincipal
- the IUMPrincipal
to create a system principal
config entry forpermissions
- an array of permissions that are to be granted to
the system principalcanChangePermissions
- the value for the system principal's
change_permissions
flagisLockBreaker
- the value for the system principal's
lock_breaker
flaghasServiceAcls
- the value for the system principal's
serviceacls
flagcanChangeSystemProperties
- the value for the system principal's
set_systemproperties
flagisAudited
- the value for the system principal's
isAudited
flagException
- if the configID or principal is empty, or if the
given configID already existspublic boolean isLockBreaker(IUser user) throws UMException
user
- the IUser
to check.true
if the user is a system principal which is
authorized to unlock an existing lock of another user.UMException
- exceptionAccess Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2018 SAP AG Complete Copyright Notice