Skip to content

Commit

Permalink
Added a 'SimpleBasicPrivilege' type to represent the possibilities of…
Browse files Browse the repository at this point in the history
… the 'SimplePrivilegeManager' classes
  • Loading branch information
AdrienCastex committed Jun 12, 2017
1 parent 2175459 commit 218af11
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/user/privilege/SimplePrivilegeManager.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { PrivilegeManagerMethod } from './IPrivilegeManager';
import { IPrivilegeManager } from './IPrivilegeManager';
export declare type SimpleBasicPrivilege = 'all' | 'canCreate' | 'canDelete' | 'canWrite' | 'canSource' | 'canRead' | 'canListLocks' | 'canSetLock' | 'canGetAvailableLocks' | 'canAddChild' | 'canRemoveChild' | 'canGetChildren' | 'canSetProperty' | 'canGetProperty';
export declare abstract class SimplePrivilegeManager implements IPrivilegeManager {
abstract canCreate: PrivilegeManagerMethod;
abstract canDelete: PrivilegeManagerMethod;
Expand Down
16 changes: 16 additions & 0 deletions src/user/privilege/SimplePrivilegeManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ import { MethodCallArgs } from '../../server/MethodCallArgs'
import { IResource } from '../../resource/IResource'
import { LockType } from '../../resource/lock/LockType'

export type SimpleBasicPrivilege =
'all'
| 'canCreate'
| 'canDelete'
| 'canWrite'
| 'canSource'
| 'canRead'
| 'canListLocks'
| 'canSetLock'
| 'canGetAvailableLocks'
| 'canAddChild'
| 'canRemoveChild'
| 'canGetChildren'
| 'canSetProperty'
| 'canGetProperty';

export abstract class SimplePrivilegeManager implements IPrivilegeManager
{
abstract canCreate : PrivilegeManagerMethod
Expand Down

0 comments on commit 218af11

Please sign in to comment.