Class EntitySharesService

java.lang.Object
org.graylog.security.shares.EntitySharesService

public class EntitySharesService extends Object
Handler for sharing calls.
  • Constructor Details

  • Method Details

    • prepareShare

      public EntityShareResponse prepareShare(GRN ownedEntity, EntityShareRequest request, User sharingUser, org.apache.shiro.subject.Subject sharingSubject)
      Prepares the sharing operation by running some checks and returning available capabilities and grantees as well as active shares and information about missing dependencies.
      Parameters:
      ownedEntity - the entity that should be shared and is owned by the sharing user
      request - sharing request
      sharingUser - the sharing user
      sharingSubject - the sharing subject
      Returns:
      the response
    • updateEntityShares

      public EntityShareResponse updateEntityShares(GRN ownedEntity, EntityShareRequest request, User sharingUser)
      Share / unshare an entity with one or more grantees. The grants in the request are created or, if they already exist, updated.
      Parameters:
      ownedEntity - the target entity for the updated grants
      request - the request containing grantees and their capabilities
      sharingUser - the user executing the request