Merge remote-tracking branch 'origin/v2.2'

This commit is contained in:
Adolfo Gómez García 2018-12-20 16:46:07 +01:00
commit ac0eefc683
2 changed files with 3 additions and 1 deletions

View File

@ -181,7 +181,7 @@ class AssignedService(DetailHandler):
logStr = 'Changing ownership of service from {} to {} by {}'.format(service.user.pretty_name, user.pretty_name, self._user.pretty_name) logStr = 'Changing ownership of service from {} to {} by {}'.format(service.user.pretty_name, user.pretty_name, self._user.pretty_name)
# If there is another service that has this same owner, raise an exception # If there is another service that has this same owner, raise an exception
if parent.userServices.filter(user=user).exclude(uuid=service.uuid).count() > 0: if parent.userServices.filter(user=user).exclude(uuid=service.uuid).exclude(state__in=State.INFO_STATES).count() > 0:
raise self.invalidResponseException('There is already another user service assigned to {}'.format(user.pretty_name)) raise self.invalidResponseException('There is already another user service assigned to {}'.format(user.pretty_name))
service.user = user service.user = user

View File

@ -438,6 +438,8 @@ gui.servicesPools.link = (event) ->
onEdit: (item, event, table, refreshFnc) -> onEdit: (item, event, table, refreshFnc) ->
gui.doLog(item) gui.doLog(item)
if item.state in ['E', 'R', 'C']
return
api.templates.get "pool_edit_assigned", (tmpl) -> api.templates.get "pool_edit_assigned", (tmpl) ->
api.authenticators.overview (data) -> api.authenticators.overview (data) ->
# Sorts groups, expression means that "if a > b returns 1, if b > a returns -1, else returns 0" # Sorts groups, expression means that "if a > b returns 1, if b > a returns -1, else returns 0"