Commit f3ebe8cc authored by lukas.burgey's avatar lukas.burgey
Browse files

Publish when deployments get removed from users

parent 88af9245
Pipeline #110560 passed with stage
in 1 minute and 22 seconds
......@@ -195,7 +195,12 @@ 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 = dep.states.all()
dep.delete()
for state in states:
LOGGER.debug(state.msg('My user is not permitted anymore'))
state.dep_target_changed() # inform the deployments states about its deletion
# service deployments
from feudal.backend.models.deployments import ServiceDeployment
......@@ -208,7 +213,12 @@ class User(AbstractUser):
if not still_permitted:
LOGGER.info(dep.msg('Deleting as user is not permitted anymore'))
states = dep.states.all()
dep.delete()
for state in states:
LOGGER.debug(state.msg('My user is not permitted anymore'))
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