mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-01 23:40:25 +00:00
automatically assign admin:true when contributor level/tier is greater than 7, and assign admin:false when less than 8
This commit is contained in:
parent
d6ce6f8986
commit
eefdfe9234
1 changed files with 1 additions and 0 deletions
|
|
@ -8,6 +8,7 @@ habitrpg.controller("HallHeroesCtrl", ['$scope', '$rootScope', 'User', 'Notifica
|
|||
$scope.hero = Hero.get({uid:uuid});
|
||||
}
|
||||
$scope.saveHero = function(hero) {
|
||||
$scope.hero.contributor.admin = ($scope.hero.contributor.level > 7) ? true : false;
|
||||
hero.$save(function(){
|
||||
Notification.text("User updated");
|
||||
$scope.hero = undefined;
|
||||
|
|
|
|||
Loading…
Reference in a new issue