From 4b6339399324743bdf3dc7f95e73f53a3aa262f1 Mon Sep 17 00:00:00 2001 From: Philip Joseph Date: Mon, 17 Apr 2017 08:36:32 +0000 Subject: [PATCH] Fix updating assigned mano-role breaks permission Change-Id: If4b7a3322c101133014a7ff2c023bc3c94da59ca Signed-off-by: Philip Joseph --- .../rift/tasklets/rwprojectmano/rolesmano.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/rwprojectmano/plugins/rwprojectmano/rift/tasklets/rwprojectmano/rolesmano.py b/rwprojectmano/plugins/rwprojectmano/rift/tasklets/rwprojectmano/rolesmano.py index 9b0ae00b..5550bfda 100644 --- a/rwprojectmano/plugins/rwprojectmano/rift/tasklets/rwprojectmano/rolesmano.py +++ b/rwprojectmano/plugins/rwprojectmano/rift/tasklets/rwprojectmano/rolesmano.py @@ -367,25 +367,19 @@ class RoleConfigPublisher(rift.tasklets.DtsConfigPublisher): return pbRole def add_update_role(self, role_key, user_key): - update = True try: role = self.roles[role_key] except KeyError: role = RoleKeysUsers(role_key) self.roles[role_key] = role - update = False try: user = role.user(user_key) except KeyError: user = UserState(user_key) role.add_user(user) - update = False - if update: - user.state = RoleConfigPublisher.yang_state_str(RoleState.UPDATE) - else: - user.state = RoleConfigPublisher.yang_state_str(RoleState.NEW) + user.state = RoleConfigPublisher.yang_state_str(RoleState.NEW) xpath = self.role_xpath(role_key) self.log.debug("update role: {} user: {} ".format(role_key, user_key)) -- 2.25.1