def get_responsible_widget_value(self, template): org_unit_id, responsible = self.replace_interactive_actors(template) actor_lookup = ActorLookup(responsible) if actor_lookup.is_inbox() or actor_lookup.is_team(): return (u'{}'.format(actor_lookup.identifier), ) else: return (u'{}:{}'.format(org_unit_id, actor_lookup.identifier), )
def get_responsible_widget_value(self, template): org_unit_id, responsible = self.replace_interactive_actors(template) actor_lookup = ActorLookup(responsible) if actor_lookup.is_inbox() or actor_lookup.is_team(): return (u'{}'.format(actor_lookup.identifier), ) else: return (u'{}:{}'.format(org_unit_id, actor_lookup.identifier), )
def get_user_ids(self): """Returns a list of userids which represents the given watcher: Means for a single user, a list with the user_id and for a inbox watcher, a list of the userids of all inbox_group users. """ actor_lookup = ActorLookup(self.actorid) if actor_lookup.is_inbox() or actor_lookup.is_team(): return [user.userid for user in Actor.lookup(self.actorid).representatives()] return [self.actorid]
def get_user_ids(self): """Returns a list of userids which represents the given watcher: Means for a single user, a list with the user_id and for a inbox watcher, a list of the userids of all inbox_group users. """ actor_lookup = ActorLookup(self.actorid) if actor_lookup.is_inbox() or actor_lookup.is_team(): return [ user.userid for user in Actor.lookup(self.actorid).representatives() ] return [self.actorid]
def get_user_ids(self): """Returns a list of userids which represents the given watcher: Means for a single user, a list with the user_id and for a inbox watcher, a list of the userids of all inbox_group users who have notify_inbox_actions set to True. """ actor_lookup = ActorLookup(self.actorid) if actor_lookup.is_inbox() or actor_lookup.is_team(): return [ user.userid for user in Actor.lookup(self.actorid).representatives() if UserSettings.get_setting_for_user(user.userid, 'notify_inbox_actions') ] return [self.actorid]