diff --git a/server/src/uds/REST/methods/user_services.py b/server/src/uds/REST/methods/user_services.py index d0d88d9ae..03c771a7a 100644 --- a/server/src/uds/REST/methods/user_services.py +++ b/server/src/uds/REST/methods/user_services.py @@ -180,7 +180,7 @@ class AssignedService(DetailHandler): 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 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)) service.user = user diff --git a/server/src/uds/static/adm/js/gui-d-servicespools.coffee b/server/src/uds/static/adm/js/gui-d-servicespools.coffee index c9ef8dba5..256dd9aa4 100644 --- a/server/src/uds/static/adm/js/gui-d-servicespools.coffee +++ b/server/src/uds/static/adm/js/gui-d-servicespools.coffee @@ -438,6 +438,8 @@ gui.servicesPools.link = (event) -> onEdit: (item, event, table, refreshFnc) -> gui.doLog(item) + if item.state in ['E', 'R', 'C'] + return api.templates.get "pool_edit_assigned", (tmpl) -> api.authenticators.overview (data) -> # Sorts groups, expression means that "if a > b returns 1, if b > a returns -1, else returns 0"