Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "factory/foundation/roles/user"

Index

Variables

Variables

Const user

user: FaunaRoleOptions = Role({name: BiotaRoleName('user'),membership: [{resource: q.Collection(BiotaCollectionName('user_sessions')),predicate: q.Query(q.Lambda('ref',q.Let({doc: q.Get(q.Var('ref')),is_valid: is_document_available,},q.If(q.Var('is_valid'),q.Let({user: q.Get(q.Select(['data', '_membership', 'owner'], q.Var('doc'), null)),},has_role(q.Var('user'), BiotaRoleName('user')),),false,),),),),},],privileges: [/*** Indexes*//*** Collections*/CustomPrivilege({resource: q.Collection(BiotaCollectionName('actions')),actions: {read: q.Query(q.Lambda('ref',q.Let({user: q.Select(['data', 'user'], q.Get(q.Var('ref'))),},q.If(q.IsRef(q.Var('user')), q.Equals(q.Var('user'), Identity()), false),),),),},}),PrivilegeRights({resource: q.Collection(BiotaCollectionName('users')),rights: {get: ['self', 'owner', 'assignee'],update: ['self', 'owner', 'assignee'],},}),PrivilegeRights({resource: q.Collection(BiotaCollectionName('user_sessions')),rights: {get: ['self', 'owner', 'assignee'],update: ['self', 'owner', 'assignee'],},}),/*** Functions*/CustomPrivilege({resource: q.Function(BiotaFunctionName('SearchQuery')),actions: { call: true },}),],})

Generated using TypeDoc