Skip to content

Commit

Permalink
chore: Bump version to 5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
masterspambot committed Dec 9, 2016
1 parent 0afee28 commit 4275d0e
Show file tree
Hide file tree
Showing 11 changed files with 105 additions and 82 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-permission",
"version": "4.1.2",
"version": "5.0.0",
"authors": [
"Rafael Vidaurre <[email protected]> (http://www.rafaelvidaurre.com)",
"Blazej Krysiak <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion dist/angular-permission-ng.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* angular-permission-ng
* Extension module of angular-permission for access control within angular-route
* @version v4.1.2 - 2016-11-06
* @version v5.0.0 - 2016-12-09
* @link https://github.com/Narzerus/angular-permission
* @author Rafael Vidaurre <[email protected]> (http://www.rafaelvidaurre.com), Blazej Krysiak <[email protected]>
* @license MIT License, http://www.opensource.org/licenses/MIT
Expand Down
2 changes: 1 addition & 1 deletion dist/angular-permission-ng.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 20 additions & 3 deletions dist/angular-permission-ui.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* angular-permission-ui
* Extension module of angular-permission for access control within ui-router
* @version v4.1.2 - 2016-11-06
* @version v5.0.0 - 2016-12-09
* @link https://github.com/Narzerus/angular-permission
* @author Rafael Vidaurre <[email protected]> (http://www.rafaelvidaurre.com), Blazej Krysiak <[email protected]>
* @license MIT License, http://www.opensource.org/licenses/MIT
Expand Down Expand Up @@ -200,7 +200,7 @@
* @returns {boolean}
*/
function areEventsDefaultPrevented() {
return isStateChangePermissionStartDefaultPrevented();
return isStateChangePermissionStartDefaultPrevented() || isStateChangeStartDefaultPrevented();
}

/**
Expand Down Expand Up @@ -256,6 +256,20 @@
PermTransitionProperties.options).defaultPrevented;
}

/**
* Checks if event $stateChangeStart hasn't been disabled by default
* @methodOf permission.ui.PermTransitionEvents
* @private
*
* @returns {boolean}
*/
function isStateChangeStartDefaultPrevented() {
return $rootScope.$broadcast('$stateChangeStart',
PermTransitionProperties.toState, PermTransitionProperties.toParams,
PermTransitionProperties.fromState, PermTransitionProperties.fromParams,
PermTransitionProperties.options).defaultPrevented;
}

return $delegate;
}

Expand Down Expand Up @@ -462,7 +476,10 @@
if (permissionMap.except.length) {
this.except = this.except.concat([permissionMap.except]);
}
this.redirectTo = permissionMap.redirectTo;

if (angular.isDefined(permissionMap.redirectTo)) {
this.redirectTo = angular.extend({}, this.redirectTo, permissionMap.redirectTo);
}
};


Expand Down
4 changes: 2 additions & 2 deletions dist/angular-permission-ui.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4275d0e

Please sign in to comment.