This hook allows plugins to lift restrictions on individual objects on a per-object per-user basis.

For efficiency, this does not affect searches. Adding a per-object rule does not allow a user to search by attributes that are restricted.

P.hook("hObjectAttributeRestrictionLabelsForUser", function(response, user, object) {
    if(isAuthorOf(user, object)) {


Name Type Description
user SecurityPrincipal SecurityPrincipal being queried
object StoreObject Object being queries


Return information by changing these properties of the response object.

Name Type Description
userLabelsForObject LabelChanges Per-object labels enabling the user to view or edit restricted attributes, specified as changes from the empty label list.

JavaScript template

P.hook('hObjectAttributeRestrictionLabelsForUser', function(response, user, object) {
    // Respond to hook, for example
    // response.userLabelsForObject = ...