toJson method
dynamic
toJson()
Implementation
dynamic toJson () {
if (allow == null && deny == null) {
throw InvalidParameterException('You must specify the authorisation or prohibition');
}
return {
'id': id,
'type': type.value,
'allow': allow != null ? Helper.reduceRolePermissions(allow!).toString() : null,
'deny': deny != null ? Helper.reduceRolePermissions(deny!).toString() : null
};
}