Check leader._id, rather than just leader for checking challenge ownership
This commit is contained in:
@@ -22,7 +22,7 @@ script(type='text/ng-template', id='partials/options.social.challenges.detail.me
|
||||
|
||||
script(type='text/ng-template', id='partials/options.social.challenges.detail.html')
|
||||
// Edit button
|
||||
div(bindonce='challenge', ng-if='challenge.leader==user._id')
|
||||
div(bindonce='challenge', ng-if='challenge.leader._id==user._id')
|
||||
div(ng-hide='challenge._locked==false')
|
||||
button.btn.btn-sm.btn-default(ng-click='edit(challenge)')=env.t('edit')
|
||||
button.btn.btn-sm.btn-warning(ng-click='close(challenge, $event)', tooltip=env.t('deleteOrSelect'))=env.t('endChallenge')
|
||||
|
||||
Reference in New Issue
Block a user