What do you think about additional warning at console (if enabled maybe?) when a PermissionDirective is executed with only and except as undefined?
In our system, we have an object with all permissions as properties, e.g.:
var availablePermissions = { allowView: "allowView", allowEdit: "allowEdit" }
If I make a mistake in name of property, than the value of only/except is undefined and the validation for required permission pass, e.g.:
<button id="edit" permissions permissions-only='availablePermissions.allowEdt'/> (allowEdt instead of allowEdit)
I think that configurable (enabled/disabled) warning, if both of them are undefined (except/only) will be very helpful in development.
What do you think about additional warning at console (if enabled maybe?) when a
PermissionDirective
is executed withonly
andexcept
asundefined
?In our system, we have an object with all permissions as properties, e.g.:
var availablePermissions = { allowView: "allowView", allowEdit: "allowEdit" }
If I make a mistake in name of property, than the value of
only/except
is undefined and the validation for required permission pass, e.g.:<button id="edit" permissions permissions-only='availablePermissions.allowEdt'/> (allowEdt instead of allowEdit)
I think that configurable (enabled/disabled) warning, if both of them are undefined (
except/only
) will be very helpful in development.angular-permission: 2.5.0
angular: 1.6.3