Commit c3056801 authored by lukas.burgey's avatar lukas.burgey

Publish when deployments get removed from users

parent 88af9245
......@@ -195,7 +195,11 @@ class User(AbstractUser):
# vo deployments
for dep in self.deployments.filter(vodeployment__vo=vo):
LOGGER.info(dep.msg('Deleting as user is not permitted anymore'))
states = list(dep.states.all())
dep.delete()
for state in states:
state.dep_target_changed() # inform the deployments states about its deletion
# service deployments
from feudal.backend.models.deployments import ServiceDeployment
......@@ -208,7 +212,11 @@ class User(AbstractUser):
if not still_permitted:
LOGGER.info(dep.msg('Deleting as user is not permitted anymore'))
states = list(dep.states.all())
dep.delete()
for state in states:
state.dep_target_changed() # inform the deployments states about its deletion
def _update_userinfo_entitlements(self, userinfo):
''' returns True if the entitlements changed in the userinfo '''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment