PermissionController<K extends RenovationDocument> class
abstract
Class containing permission properties/caches & methods
- Inheritance
-
- Object
- RenovationController
- PermissionController
- Implementers
Constructors
- PermissionController(RenovationConfig config)
Properties
- basicPerms ↔ BasicPermInfo?
-
Holds the basic permissions defined by BasicPermInfo.
getter/setter pair
- config → RenovationConfig
-
finalinherited
-
doctypePerms
↔ Map<
String?, List< DocPerm> > -
Holds the permissions for each doctype as a form of caching.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
canAmend(
String doctype) → Future< bool> - Check if the user can amend a doctype.
-
canCancel(
String doctype) → Future< bool> - Check if the user can cancel a doctype.
-
canCreate(
String doctype) → Future< bool> - Check if the user can create a doctype.
-
canDelete(
String doctype) → Future< bool> - Check if the user can delete a doctype.
-
canEmail(
String doctype) → Future< bool> - Check if the user can email a doctype.
-
canExport(
String doctype) → Future< bool> - Check if the user can export a doctype.
-
canGetReport(
String doctype) → Future< bool> - Check if the user can get report of a doctype.
-
canImport(
String doctype) → Future< bool> - Check if the user can import a doctype.
-
canPrint(
String doctype) → Future< bool> - Check if the user can print a doctype.
-
canRead(
String doctype) → Future< bool> - Check if the user can read a doctype.
-
canRecursiveDelete(
String doctype) → Future< bool> - Check if the user can recursively delete a doctype.
-
canSearch(
String doctype) → Future< bool> - Check if the user can search a doctype.
-
canSetUserPermissions(
String doctype) → Future< bool> - Check if the user can set user permissions of a doctype.
-
canSubmit(
String doctype) → Future< bool> - Check if the user can submit a doctype.
-
canWrite(
String doctype) → Future< bool> - Check if the user can write a doctype
-
clearCache(
) → void -
Resets the basicPerms and doctypePerms properties.
override
-
getCore(
) → Renovation -
Gets the reference to the Renovation instance
inherited
-
getHostUrl(
) → String -
Returns the configured host URL towards the backend
inherited
-
getPerm<
T extends K> ({required String doctype, T? document}) → Future< RequestResponse< List> > -
Returns the list permission of the current user of a certain
doctype
. -
handleError(
String errorId, ErrorDetail error) → ErrorDetail -
Returns the
ErrorDetail
after manipulating an existing one.inherited -
hasPerm(
{required String? doctype, required PermissionType pType, int? permLevel, String? docname}) → Future< bool> -
Returns boolean whether the user has perm
pType
for a particulardoctype
. -
hasPerms(
{required String doctype, required List< PermissionType> pTypes, String? docname}) → Future<bool> -
Similar to hasPerm but instead can accept a list of perms
pTypes
. -
loadBasicPerms(
) → Future< RequestResponse> - Loads the basic params from the backend for the current user.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited