|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.social.service.rest.SecurityManager
public class SecurityManager
The security manager helper class for Social Rest APIs.
| Constructor Summary | |
|---|---|
SecurityManager()
|
|
| Method Summary | |
|---|---|
static boolean |
canAccessActivity(org.exoplatform.container.PortalContainer portalContainer,
org.exoplatform.social.core.identity.model.Identity authenticatedIdentity,
org.exoplatform.social.core.activity.model.ExoSocialActivity existingActivity)
Checks if an authenticated identity can access an existing activity. |
static boolean |
canAccessActivity(org.exoplatform.container.PortalContainer portalContainer,
String userIdentityId,
org.exoplatform.social.core.activity.model.ExoSocialActivity existingActivity)
Checks if an authenticated remoteId of user can access an existing activity. |
static boolean |
canAccessActivityStream(org.exoplatform.container.PortalContainer portalContainer,
org.exoplatform.social.core.identity.model.Identity authenticatedIdentity,
org.exoplatform.social.core.identity.model.Identity ownerStream)
Checks if an authenticated identity could access the activity stream of an owner stream identity. |
static boolean |
canCommentToActivity(org.exoplatform.container.PortalContainer portalContainer,
org.exoplatform.social.core.identity.model.Identity authenticatedIdentity,
org.exoplatform.social.core.activity.model.ExoSocialActivity existingActivity)
Checks if an authenticated identity has the permission to comment on an existing activity. |
static boolean |
canDeleteActivity(org.exoplatform.container.PortalContainer portalContainer,
org.exoplatform.social.core.identity.model.Identity authenticatedIdentity,
org.exoplatform.social.core.activity.model.ExoSocialActivity existingActivity)
Checks if an authenticated identity has the permission to delete an existing activity. |
static boolean |
canDeleteComment(org.exoplatform.container.PortalContainer portalContainer,
org.exoplatform.social.core.identity.model.Identity authenticatedIdentity,
org.exoplatform.social.core.activity.model.ExoSocialActivity existingComment)
Checks if an authenticated identity has the permission to delete an existing comment. |
static boolean |
canPostActivity(org.exoplatform.container.PortalContainer portalContainer,
org.exoplatform.social.core.identity.model.Identity authenticatedIdentity,
org.exoplatform.social.core.identity.model.Identity ownerIdentityStream)
Checks if an poster identity has the permission to post activities on an owner identity stream. |
static org.exoplatform.social.core.identity.model.Identity |
getAuthenticatedUserIdentity()
Deprecated. use Util.getAuthenticatedUserIdentity(String) instead. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SecurityManager()
| Method Detail |
|---|
public static boolean canAccessActivity(org.exoplatform.container.PortalContainer portalContainer,
String userIdentityId,
org.exoplatform.social.core.activity.model.ExoSocialActivity existingActivity)
Checks if an authenticated remoteId of user can access an existing activity.
If the authenticated identity is the one who posted that existing activity, return true.
portalContainer - the specified portal containeruserIdentityId - the authenticated identity to checkexistingActivity - the existing activity to check
public static boolean canAccessActivity(org.exoplatform.container.PortalContainer portalContainer,
org.exoplatform.social.core.identity.model.Identity authenticatedIdentity,
org.exoplatform.social.core.activity.model.ExoSocialActivity existingActivity)
Checks if an authenticated identity can access an existing activity.
If the authenticated identity is the one who posted that existing activity, return true.
portalContainer - the specified portal containerauthenticatedIdentity - the authenticated identity to checkexistingActivity - the existing activity to check
public static boolean canPostActivity(org.exoplatform.container.PortalContainer portalContainer,
org.exoplatform.social.core.identity.model.Identity authenticatedIdentity,
org.exoplatform.social.core.identity.model.Identity ownerIdentityStream)
Checks if an poster identity has the permission to post activities on an owner identity stream.
If posterIdentity is the same as ownerIdentityStream, return true.
portalContainer - the specified portal containerauthenticatedIdentity - the authenticated identity to checkownerIdentityStream - the identity of an existing activity stream.
public static boolean canDeleteActivity(org.exoplatform.container.PortalContainer portalContainer,
org.exoplatform.social.core.identity.model.Identity authenticatedIdentity,
org.exoplatform.social.core.activity.model.ExoSocialActivity existingActivity)
Checks if an authenticated identity has the permission to delete an existing activity.
If the authenticated identity is the identity who creates that existing activity, return true.
portalContainer - the specified portal containerauthenticatedIdentity - the identity to checkexistingActivity - the existing activity
public static boolean canCommentToActivity(org.exoplatform.container.PortalContainer portalContainer,
org.exoplatform.social.core.identity.model.Identity authenticatedIdentity,
org.exoplatform.social.core.activity.model.ExoSocialActivity existingActivity)
Checks if an authenticated identity has the permission to comment on an existing activity.
If commenterIdentity is the one who creates the existing activity, return true.
portalContainer - the specified portal containerauthenticatedIdentity - the authenticated identity to checkexistingActivity - the existing activity
public static boolean canDeleteComment(org.exoplatform.container.PortalContainer portalContainer,
org.exoplatform.social.core.identity.model.Identity authenticatedIdentity,
org.exoplatform.social.core.activity.model.ExoSocialActivity existingComment)
Checks if an authenticated identity has the permission to delete an existing comment.
If authenticatedIdentity is the one who creates the existing comment, return true.
portalContainer - the specified portal containerauthenticatedIdentity - the authenticated identity to checkexistingComment - the existing comment
public static org.exoplatform.social.core.identity.model.Identity getAuthenticatedUserIdentity()
Util.getAuthenticatedUserIdentity(String) instead.
Gets the current logged in Identity, if not logged in return null
public static boolean canAccessActivityStream(org.exoplatform.container.PortalContainer portalContainer,
org.exoplatform.social.core.identity.model.Identity authenticatedIdentity,
org.exoplatform.social.core.identity.model.Identity ownerStream)
portalContainer - the portal containerauthenticatedIdentity - the authenticated identityownerStream - the stream owner identity
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||