Fixed tag presenter not checking delete privilege

This commit is contained in:
Marcin Kurczewski 2014-11-10 11:29:05 +01:00
parent e6ab9ee3b3
commit be4b742d21
2 changed files with 4 additions and 1 deletions

View file

@ -36,6 +36,7 @@ App.Presenters.TagPresenter = function(
privileges.canChangeSuggestions = auth.hasPrivilege(auth.privileges.changeTagSuggestions);
privileges.canBan = auth.hasPrivilege(auth.privileges.banTags);
privileges.canViewHistory = auth.hasPrivilege(auth.privileges.viewHistory);
privileges.canDelete = auth.hasPrivilege(auth.privileges.deleteTags);
promise.wait(
util.promiseTemplate('tag'),

View file

@ -71,7 +71,9 @@
<label class="form-label"></label>
<div class="form-input">
<button type="submit" name="update">Update</button>
<% if (privileges.canDelete) { %>
<button type="submit" name="delete">Delete</button>
<% } %>
</div>
</div>
<% } %>