use of org.apereo.portal.EntityIdentifier in project uPortal by Jasig.
the class PermissionAdministrationHelper method canViewActivity.
public boolean canViewActivity(IPerson currentUser, String activity) {
EntityIdentifier ei = currentUser.getEntityIdentifier();
IAuthorizationPrincipal ap = AuthorizationService.instance().newPrincipal(ei.getKey(), ei.getType());
return (ap.hasPermission(IPermission.PORTAL_PERMISSIONS, IPermission.VIEW_PERMISSIONS_ACTIVITY, IPermission.ALL_TARGET));
}
use of org.apereo.portal.EntityIdentifier in project uPortal by Jasig.
the class PermissionAdministrationHelper method canEditPermission.
/* (non-Javadoc)
* @see org.apereo.portal.portlets.permissionsadmin.IPermissionAdministrationHelper#canEditPermission(org.apereo.portal.security.IPerson, java.lang.String)
*/
public boolean canEditPermission(IPerson currentUser, String target) {
EntityIdentifier ei = currentUser.getEntityIdentifier();
IAuthorizationPrincipal ap = AuthorizationService.instance().newPrincipal(ei.getKey(), ei.getType());
return (ap.hasPermission(IPermission.PORTAL_PERMISSIONS, IPermission.EDIT_PERMISSIONS_ACTIVITY, IPermission.ALL_TARGET));
}
use of org.apereo.portal.EntityIdentifier in project uPortal by Jasig.
the class PermissionAdministrationHelper method canViewPermission.
/* (non-Javadoc)
* @see org.apereo.portal.portlets.permissionsadmin.IPermissionAdministrationHelper#canViewPermission(org.apereo.portal.security.IPerson, java.lang.String)
*/
public boolean canViewPermission(IPerson currentUser, String target) {
EntityIdentifier ei = currentUser.getEntityIdentifier();
IAuthorizationPrincipal ap = AuthorizationService.instance().newPrincipal(ei.getKey(), ei.getType());
return (ap.hasPermission(IPermission.PORTAL_PERMISSIONS, IPermission.VIEW_PERMISSIONS_ACTIVITY, IPermission.ALL_TARGET));
}
use of org.apereo.portal.EntityIdentifier in project uPortal by Jasig.
the class PermissionAdministrationHelper method canViewOwner.
public boolean canViewOwner(IPerson currentUser, String owner) {
EntityIdentifier ei = currentUser.getEntityIdentifier();
IAuthorizationPrincipal ap = AuthorizationService.instance().newPrincipal(ei.getKey(), ei.getType());
return (ap.hasPermission(IPermission.PORTAL_PERMISSIONS, IPermission.VIEW_PERMISSIONS_ACTIVITY, IPermission.ALL_TARGET));
}
use of org.apereo.portal.EntityIdentifier in project uPortal by Jasig.
the class PermissionAdministrationHelper method canEditActivity.
public boolean canEditActivity(IPerson currentUser, String activity) {
EntityIdentifier ei = currentUser.getEntityIdentifier();
IAuthorizationPrincipal ap = AuthorizationService.instance().newPrincipal(ei.getKey(), ei.getType());
return (ap.hasPermission(IPermission.PORTAL_PERMISSIONS, IPermission.EDIT_PERMISSIONS_ACTIVITY, IPermission.ALL_TARGET));
}
Aggregations