Skip to content

Commit

Permalink
Added the 'all' privilege in the 'BasicPrivilege' type
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrienCastex committed Jun 12, 2017
1 parent b6548aa commit 318e526
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/user/privilege/IPrivilegeManager.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { MethodCallArgs } from '../../server/MethodCallArgs';
import { IResource } from '../../resource/IResource';
export declare type PrivilegeManagerCallback = (error: Error, hasAccess: boolean) => void;
export declare type PrivilegeManagerMethod = (arg: MethodCallArgs, resource: IResource, callback: PrivilegeManagerCallback) => void;
export declare type BasicPrivilege = 'canCreate' | 'canDelete' | 'canMove' | 'canRename' | 'canAppend' | 'canWrite' | 'canRead' | 'canSource' | 'canGetMimeType' | 'canGetSize' | 'canListLocks' | 'canSetLock' | 'canRemoveLock' | 'canGetAvailableLocks' | 'canGetLock' | 'canAddChild' | 'canRemoveChild' | 'canGetChildren' | 'canSetProperty' | 'canGetProperty' | 'canGetProperties' | 'canRemoveProperty' | 'canGetCreationDate' | 'canGetLastModifiedDate' | 'canGetWebName' | 'canGetType';
export declare type BasicPrivilege = 'all' | 'canCreate' | 'canDelete' | 'canMove' | 'canRename' | 'canAppend' | 'canWrite' | 'canRead' | 'canSource' | 'canGetMimeType' | 'canGetSize' | 'canListLocks' | 'canSetLock' | 'canRemoveLock' | 'canGetAvailableLocks' | 'canGetLock' | 'canAddChild' | 'canRemoveChild' | 'canGetChildren' | 'canSetProperty' | 'canGetProperty' | 'canGetProperties' | 'canRemoveProperty' | 'canGetCreationDate' | 'canGetLastModifiedDate' | 'canGetWebName' | 'canGetType';
export declare function requirePrivilege(privilege: string | BasicPrivilege | string[] | BasicPrivilege[], arg: MethodCallArgs, resource: IResource, callback: PrivilegeManagerCallback): void;
export interface IPrivilegeManager {
canCreate: PrivilegeManagerMethod;
Expand Down
3 changes: 2 additions & 1 deletion src/user/privilege/IPrivilegeManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ export type PrivilegeManagerCallback = (error : Error, hasAccess : boolean) => v
export type PrivilegeManagerMethod = (arg : MethodCallArgs, resource : IResource, callback : PrivilegeManagerCallback) => void

export type BasicPrivilege =
'canCreate'
'all'
| 'canCreate'
| 'canDelete'
| 'canMove'
| 'canRename'
Expand Down

0 comments on commit 318e526

Please sign in to comment.