public class ReflectionPermissionModule extends PermissionModule
For example, if an addOn were to reflect on the secure access class to get root access, then the ReflectionPermissionModule would stop that reflection.
log, main
Constructor and Description |
---|
ReflectionPermissionModule(Main main,
SecurityManager securityManager)
Creates a new ReflectionPermissionModule
|
Modifier and Type | Method and Description |
---|---|
boolean |
canCheckPermission(Permission permission)
returns true if able to check permissions
|
void |
checkPermission(Permission permission,
AddOnModel addon)
Checks if the given addOn is allowed to access the requested service.
|
getSecurityManager, isRegistered, registerAddOn, registerOrThrow
debug, debug, error, error, fatal, fatal, getID, getMain
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isOwner
public ReflectionPermissionModule(Main main, SecurityManager securityManager)
main
- the main class of IzousecurityManager
- the security manager in Izoupublic boolean canCheckPermission(Permission permission)
PermissionModule
canCheckPermission
in class PermissionModule
permission
- the permission to checkpublic void checkPermission(Permission permission, AddOnModel addon) throws SecurityException
PermissionModule
checkPermission
in class PermissionModule
permission
- the Permission to checkaddon
- the identifiable to checkSecurityException
- thrown if the addOn is not allowed to access its requested serviceCopyright © 2016. All rights reserved.