Merge branch 'develop' of git.znuny.com:zammad/zammad into develop

This commit is contained in:
Martin Edenhofer 2017-04-24 15:16:54 +02:00
commit aa4c34d53f
2 changed files with 3 additions and 1 deletions

View file

@ -903,6 +903,8 @@ raise 'Minimum one user need to have admin permissions'
=end =end
def last_admin_check(role) def last_admin_check(role)
return if Setting.get('import_mode')
ticket_admin_role_ids = Role.joins(:permissions).where(permissions: { name: ['admin', 'admin.user'] }).pluck(:id) ticket_admin_role_ids = Role.joins(:permissions).where(permissions: { name: ['admin', 'admin.user'] }).pluck(:id)
count = User.joins(:roles).where(roles: { id: ticket_admin_role_ids }, users: { active: true }).count count = User.joins(:roles).where(roles: { id: ticket_admin_role_ids }, users: { active: true }).count
if ticket_admin_role_ids.include?(role.id) if ticket_admin_role_ids.include?(role.id)

View file

@ -43,7 +43,7 @@ Doorkeeper.configure do
# reuse_access_token # reuse_access_token
# Issue access tokens with refresh token (disabled by default) # Issue access tokens with refresh token (disabled by default)
# use_refresh_token use_refresh_token
# Provide support for an owner to be assigned to each registered application (disabled by default) # Provide support for an owner to be assigned to each registered application (disabled by default)
# Optional parameter confirmation: true (default false) if you want to enforce ownership of # Optional parameter confirmation: true (default false) if you want to enforce ownership of