Commit 84fee048d23444771ef349b5d8ab7887582f9aa0
1 parent
32baafc9
Exists in
master
and in
29 other branches
Check for current user for "unblock" button
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
app/views/blocks/disabled_enterprise_message.rhtml
| 1 | 1 | <div id='enterprise-disabled'> |
| 2 | 2 | <%= message %> |
| 3 | - <% if profile.blocked? && user.is_admin?(profile.environment) %> | |
| 3 | + <% if profile.blocked? && user && user.is_admin?(profile.environment) %> | |
| 4 | 4 | <div class='unlock-button'> |
| 5 | 5 | <%= button :lock, _('Unblock'), {:controller => 'profile', :action => 'unblock'} %> |
| 6 | 6 | </div> | ... | ... |
app/views/shared/_disabled_enterprise.rhtml
| 1 | 1 | <% if profile.enterprise? && !profile.enabled? && !profile.blocks.select {|b| b.class == DisabledEnterpriseMessageBlock}.any? %> |
| 2 | 2 | <div id='profile-disabled'> |
| 3 | 3 | <%= environment.message_for_disabled_enterprise %> |
| 4 | - <% if profile.blocked? && user.is_admin?(profile.environment) %> | |
| 4 | + <% if profile.blocked? && user && user.is_admin?(profile.environment) %> | |
| 5 | 5 | <div class='unlock-button'> |
| 6 | 6 | <%= button :lock, _('Unblock'), {:controller => 'profile', :action => 'unblock'} %> |
| 7 | 7 | </div> | ... | ... |