Releases: RafaelVidaurre/angular-permission
DefineManyRoles
Allows you to define multiple roles which share the same validator function
Thanks to @chaaya
More powerful redirects
Implemented ability to pass a function to the redirectTo
property
Version 0.2
This version fixes some errors on how state changes were being handed on the redirects as well as the parameters passed in some events.
Thanks to @flyskyko and @stefanotorresi for their contributions!
Fix UI-Router version
Fix UI-Router version in the dependencies
Persist parameters along state chanegs and minor improvements
- Fixed parameters not being passed on redirect @OverZealous
- Fixed some test errors @ankri
Ability to prevent state changes
Permission was taking away the ability to prevent state changes as one normally should be able to.
This got fixed in this version, again thanks to @ankri
Ability to use state parameters in validations
This release now exposes the parameters of the state so that they can be used at your role validation functions
This release is thanks to @bezoerb.
Events
Hotfix: Typos fixed
- Fixed typos on some error strings
- Fixed typos on Readme.md (thanks @evan-007)
- Updated test files which were explicitly testing if the typo was there. -laughs-
Inheritable state permissions
Changes
- Now allowing to define state permissions from the
data
key instead the actualy state object. Thus allowing children states to inherit permission restrictions - Will still allow for now state permissions on the state object though this will be deprecated in version 1.0.0
Defining state permissions now allows:
$stateProvider
.state('bookmarks', {
...,
data: {
permissions: {...}
}
});
Which makes us capable of using inheritance from parent states like this:
$stateProvider
.state('bookmarks', {
abstract: true,
data: {
permissions: {...}
}
})
// This state will require permissions from parent state
.state('bookmarks.index', {
...
});