app/models/contextual_permission.rb
def empty_permission_for(user, entity)
      attrs = DEFAULT_ATTRIBUTES.merge(
        hierarchical: entity,
        user: user
      )

      ContextualPermission.new(attrs)
    end
# Calculate an empty permission set for a given user / entity combination.
#
# @param [User] user
# @param [HierarchicalEntity] entity
# @return [ContextualPermission]
Calculate an empty permission set for a given user / entity combination.
Calculate an empty permission set for a given user / entity combination .
def empty_permission_for(user, entity)
      attrs = DEFAULT_ATTRIBUTES.merge(
        hierarchical: entity,
        user: user
      )
      ContextualPermission.new(attrs)
    end
def empty_permission_for ( user , entity ) attrs = DEFAULT_ATTRIBUTES . merge ( hierarchical : entity , user : user ) ContextualPermission . new ( attrs ) end
Calculate an empty permission set for a given user / entity combination.
Calculate an empty permission set for a given user / entity combination .
None
ContextualPermission
user
entity
None