Skip to content

Releases: RafaelVidaurre/angular-permission

DefineManyRoles

08 Jul 00:05
Compare
Choose a tag to compare

Allows you to define multiple roles which share the same validator function

Thanks to @chaaya

More powerful redirects

15 Jun 21:06
Compare
Choose a tag to compare

Implemented ability to pass a function to the redirectTo property

Version 0.2

05 Mar 23:39
Compare
Choose a tag to compare

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

16 Feb 18:06
Compare
Choose a tag to compare

Fix UI-Router version in the dependencies

Persist parameters along state chanegs and minor improvements

01 Dec 16:03
Compare
Choose a tag to compare
  • Fixed parameters not being passed on redirect @OverZealous
  • Fixed some test errors @ankri

Ability to prevent state changes

07 Nov 18:15
Compare
Choose a tag to compare

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

04 Nov 05:03
Compare
Choose a tag to compare

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

31 Oct 19:52
Compare
Choose a tag to compare

This version includes events which will be broadcasted once a permissions are accepted or rejected on a route change.

Two events are now available:

  • $stateChangePermissionAccepted
  • $stateChangePermissionRejected

This version was developed by @ankri

Hotfix: Typos fixed

27 Oct 00:04
Compare
Choose a tag to compare
  • 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

04 Sep 22:16
Compare
Choose a tag to compare

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', {
  ...
  });