def get_document_groups(): """Get Document Groups - order by group id """ group_options = [("", "-")] user = model_utils.get_login_user() groups = [ g for g in model_utils.get_user_groups(user) ] group_values = [ (g.group_id, IDCDescriptiveProperties(g).short_title) for g in groups ] group_options += sorted(group_values) return group_options
def get_document_groups(): """Get Document Groups - order by group id """ group_options = [("", "-")] user = model_utils.get_login_user() groups = [g for g in model_utils.get_user_groups(user)] group_values = [(g.group_id, IDCDescriptiveProperties(g).short_title) for g in groups] group_options += sorted(group_values) return group_options
def is_type_workspaced(self, type_key): """Is this type workspaced for this !+workspace context (for user)? !+WORKSPACE_GROUP_CONTEXTS should be refined further to specific groups, not just be WorkspaceContainer-wide (for all groups)! """ ti = capi.get_type_info(type_key) workspace_feature = ti.workflow.get_feature("workspace") if workspace_feature is not None: group_names = workspace_feature.get_param("group_names") if group_names: user = utils.get_login_user() for group in utils.get_user_groups(user): if group.conceptual_name in group_names: return True return False