Skip to content

Commit

Permalink
Remove unnecessary
Browse files Browse the repository at this point in the history
  • Loading branch information
haricot committed May 5, 2017
1 parent e05498d commit af65742
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cms/utils/placeholder.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,8 @@ def get_toolbar_plugin_struct(plugins, slot=None, page=None):

# plugin.value points to the class name of the plugin
# It's added on registration. TIL.
for plugin in plugins:
if hasattr(get_current_user(), 'has_perm'):
if has_plugin_permission(get_current_user(), plugin.value , 'add'):
for plugin in plugins:
if has_plugin_permission(get_current_user(), plugin.value , 'add'):
main_list.append({'value': plugin.value,
'name': names.get(plugin.value, plugin.name),
'module': modules.get(plugin.value, plugin.module)})
Expand Down

0 comments on commit af65742

Please sign in to comment.