NyAction class
Nylo's NyAction class
Constructors
- NyAction()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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
Static Methods
-
Perform an action only if the user is authorized to do so.
Provide a
perform
function to execute if the user is authorized. Provide awhen
function to check if the user is authorized. Provide anunauthorized
function to execute if the user is not authorized. -
limitPerDay(
String actionKey, dynamic perform(), {int maxPerDay = 5, dynamic unauthorized()?}) → dynamic -
Limit the number of times an action can be performed in a day.
Provide an
actionKey
for the action you want to limit. Provide anperform
to execute if the user is authorized. Provide amaxPerDay
to limit the number of times the action can be performed.