timApp.plugin.userselect package#

Submodules#

timApp.plugin.userselect.userselect module#

class timApp.plugin.userselect.userselect.ActionCollection(addPermission: list[timApp.plugin.userselect.userselect.AddPermission] = <factory>, confirmPermission: list[timApp.plugin.userselect.userselect.ConfirmPermission] = <factory>, removePermission: list[timApp.plugin.userselect.userselect.RemovePermission] = <factory>, changePermissionTime: list[timApp.plugin.userselect.userselect.ChangePermissionTime] = <factory>, distributeRight: list[timApp.plugin.userselect.userselect.DistributeRightAction] = <factory>, setValue: list[timApp.plugin.userselect.userselect.SetTaskValueAction] = <factory>, addToGroups: list[str] = <factory>, removeFromGroups: list[str] = <factory>, changeGroup: timApp.plugin.userselect.userselect.ChangeGroupAction | None = None, verifyRemoteSessions: list[str] = <factory>, invalidateRemoteSessions: list[str] = <factory>)[source]#

Bases: object

addPermission: list[timApp.plugin.userselect.userselect.AddPermission]#
addToGroups: list[str]#
changeGroup: timApp.plugin.userselect.userselect.ChangeGroupAction | None = None#
changePermissionTime: list[timApp.plugin.userselect.userselect.ChangePermissionTime]#
confirmPermission: list[timApp.plugin.userselect.userselect.ConfirmPermission]#
distributeRight: list[timApp.plugin.userselect.userselect.DistributeRightAction]#
invalidateRemoteSessions: list[str]#
removeFromGroups: list[str]#
removePermission: list[timApp.plugin.userselect.userselect.RemovePermission]#
setValue: list[timApp.plugin.userselect.userselect.SetTaskValueAction]#
verifyRemoteSessions: list[str]#
class timApp.plugin.userselect.userselect.AddPermission(doc_path: str, type: timApp.auth.accesstype.AccessType, time: timApp.item.manage.TimeOpt, confirm: bool = False)[source]#

Bases: timApp.plugin.userselect.userselect.PermissionActionBase

confirm: bool = False#
time: timApp.item.manage.TimeOpt#
class timApp.plugin.userselect.userselect.ChangeGroupAction(changeTo: str, allGroups: list[str], verify: bool = False)[source]#

Bases: object

allGroups: list[str]#
property all_groups: list[str]#
changeTo: str#
verify: bool = False#
class timApp.plugin.userselect.userselect.ChangePermissionTime(doc_path: str, type: timApp.auth.accesstype.AccessType, minutes: float)[source]#

Bases: timApp.plugin.userselect.userselect.PermissionActionBase

minutes: float#
class timApp.plugin.userselect.userselect.ConfirmPermission(doc_path: str, type: timApp.auth.accesstype.AccessType)[source]#

Bases: timApp.plugin.userselect.userselect.PermissionActionBase

class timApp.plugin.userselect.userselect.DistributeRightAction(operation: Literal['confirm', 'quit', 'unlock', 'changetime', 'undoquit'], target: str | list[str], timestamp: datetime.datetime | None = None, minutes: float = 0.0)[source]#

Bases: object

minutes: float = 0.0#
operation: Literal['confirm', 'quit', 'unlock', 'changetime', 'undoquit']#
target: str | list[str]#
timestamp: datetime.datetime | None = None#
property timestamp_or_now: datetime.datetime#
class timApp.plugin.userselect.userselect.NeedsVerifyReasons(value)[source]#

Bases: enum.Enum

An enumeration.

CHANGE_GROUP_ALREADY_MEMBER = 'changeGroupAlreadyMember'#
CHANGE_GROUP_BELONGS = 'changeGroupBelongs'#
class timApp.plugin.userselect.userselect.PermissionActionBase(doc_path: str, type: timApp.auth.accesstype.AccessType)[source]#

Bases: object

doc_path: str#
type: timApp.auth.accesstype.AccessType#
class timApp.plugin.userselect.userselect.RemovePermission(doc_path: str, type: timApp.auth.accesstype.AccessType)[source]#

Bases: timApp.plugin.userselect.userselect.PermissionActionBase

class timApp.plugin.userselect.userselect.ScannerOptions(applyOnMatch: bool = False, continuousMatch: bool = False, enabled: bool = False, scanInterval: float = 1.5, waitBetweenScans: float = 0.0, beepOnSuccess: bool = False, beepOnFailure: bool = False, parameterSeparator: str | None = '#')[source]#

Bases: object

applyOnMatch: bool = False#
beepOnFailure: bool = False#
beepOnSuccess: bool = False#
continuousMatch: bool = False#
enabled: bool = False#
parameterSeparator: str | None = '#'#
scanInterval: float = 1.5#
waitBetweenScans: float = 0.0#
class timApp.plugin.userselect.userselect.SetTaskValueAction(taskId: str, value: str)[source]#

Bases: object

taskId: str#
value: str#
class timApp.plugin.userselect.userselect.TextOptions(apply: str | None = None, cancel: str | None = None, success: str | None = None, undone: str | None = None, undo: str | None = None, undoWarning: str | None = None, verifyReasons: dict[str, str] = <factory>)[source]#

Bases: object

apply: str | None = None#
cancel: str | None = None#
success: str | None = None#
undo: str | None = None#
undoWarning: str | None = None#
undone: str | None = None#
verifyReasons: dict[str, str]#
class timApp.plugin.userselect.userselect.UserSelectHtmlModel(info: tim_common.pluginserver_flask.InfoModel | None, markup: ~PluginMarkup, state: Optional[~PluginState], taskID: str, anonymous: bool, current_user_id: str, doLazy: tim_common.pluginserver_flask.Laziness, preview: bool, review: bool, targetFormat: str, taskIDExt: str, user_id: str, userPrint: bool, viewmode: bool, access: str | marshmallow.utils._Missing = <marshmallow.missing>)[source]#

Bases: tim_common.pluginserver_flask.GenericHtmlModel[timApp.plugin.userselect.userselect.UserSelectInputModel, timApp.plugin.userselect.userselect.UserSelectMarkupModel, timApp.plugin.userselect.userselect.UserSelectStateModel]

get_component_html_name() str[source]#

Gets the name of the Angular component as it should be in HTML.

get_static_html() str[source]#

Renders a static version of the plugin.

This is meant to be a static lightweight lookalike version of the plugin.

class timApp.plugin.userselect.userselect.UserSelectInputModel[source]#

Bases: object

class timApp.plugin.userselect.userselect.UserSelectMarkupModel(accessDuration: int | None | marshmallow.utils._Missing = <marshmallow.missing>, accessEndText: str | None | marshmallow.utils._Missing = <marshmallow.missing>, anonymous: bool | None | marshmallow.utils._Missing = <marshmallow.missing>, answerLimit: int | None | marshmallow.utils._Missing = <marshmallow.missing>, automd: bool | None | marshmallow.utils._Missing = <marshmallow.missing>, buttonNewTask: str | None | marshmallow.utils._Missing = <marshmallow.missing>, cache: bool | None | marshmallow.utils._Missing = <marshmallow.missing>, deadline: Union[tim_common.markupmodels.PluginDateTime, datetime.datetime, NoneType, marshmallow.utils._Missing] = <marshmallow.missing>, fields: list[str] = <factory>, floatHeader: str | None | marshmallow.utils._Missing = <marshmallow.missing>, floatSize: tuple[int, int] | None | marshmallow.utils._Missing = <marshmallow.missing>, header: str | None | marshmallow.utils._Missing = <marshmallow.missing>, headerText: str | None | marshmallow.utils._Missing = <marshmallow.missing>, hideBrowser: bool | marshmallow.utils._Missing | None = <marshmallow.missing>, initNewAnswer: str | None | marshmallow.utils._Missing = <marshmallow.missing>, lazy: bool | marshmallow.utils._Missing = <marshmallow.missing>, maxHeight: str | None | marshmallow.utils._Missing = <marshmallow.missing>, minHeight: str | None | marshmallow.utils._Missing = <marshmallow.missing>, pointsRule: tim_common.markupmodels.PointsRule | None | marshmallow.utils._Missing = <marshmallow.missing>, pointsText: str | None | marshmallow.utils._Missing = <marshmallow.missing>, postprogram: str | marshmallow.utils._Missing = <marshmallow.missing>, postoutput: str | marshmallow.utils._Missing = <marshmallow.missing>, showPoints: bool | None | marshmallow.utils._Missing = <marshmallow.missing>, starttime: Union[tim_common.markupmodels.PluginDateTime, datetime.datetime, NoneType, marshmallow.utils._Missing] = <marshmallow.missing>, showInView: bool | marshmallow.utils._Missing = <marshmallow.missing>, stem: str | None | marshmallow.utils._Missing = <marshmallow.missing>, triesText: str | None | marshmallow.utils._Missing = <marshmallow.missing>, useCurrentUser: bool | None | marshmallow.utils._Missing = <marshmallow.missing>, texafterprint: str | None | marshmallow.utils._Missing = <marshmallow.missing>, texbeforeprint: str | None | marshmallow.utils._Missing = <marshmallow.missing>, texprint: str | None | marshmallow.utils._Missing = <marshmallow.missing>, hidden_keys: list[str] | marshmallow.utils._Missing = <marshmallow.missing>, button: str | None | marshmallow.utils._Missing = <marshmallow.missing>, buttonText: str | None | marshmallow.utils._Missing = <marshmallow.missing>, allowUnsavedLeave: bool | marshmallow.utils._Missing | None = <marshmallow.missing>, disableUnchanged: bool | marshmallow.utils._Missing | None = <marshmallow.missing>, footer: str | marshmallow.utils._Missing = <marshmallow.missing>, forceBrowser: bool | marshmallow.utils._Missing | None = <marshmallow.missing>, globalField: bool | marshmallow.utils._Missing | None = <marshmallow.missing>, readonly: bool | marshmallow.utils._Missing | None = <marshmallow.missing>, lang: str | None | marshmallow.utils._Missing = <marshmallow.missing>, resetText: str | marshmallow.utils._Missing | None = <marshmallow.missing>, connectionErrorMessage: str | marshmallow.utils._Missing = <marshmallow.missing>, undo: tim_common.markupmodels.UndoInfo | marshmallow.utils._Missing | None = <marshmallow.missing>, allowUndo: bool = False, preFetch: bool = False, inputMinLength: int = 3, autoSearchDelay: float = 0.0, selectOnce: bool = False, maxMatches: int = 10, scanner: timApp.plugin.userselect.userselect.ScannerOptions = <factory>, groups: list[str] = <factory>, actions: timApp.plugin.userselect.userselect.ActionCollection | None = None, text: timApp.plugin.userselect.userselect.TextOptions = <factory>, displayFields: list[str] = <factory>, sortBy: list[str] = <factory>)[source]#

Bases: tim_common.markupmodels.GenericMarkupModel

actions: timApp.plugin.userselect.userselect.ActionCollection | None = None#
allowUndo: bool = False#
autoSearchDelay: float = 0.0#
displayFields: list[str]#
groups: list[str]#
inputMinLength: int = 3#
maxMatches: int = 10#
preFetch: bool = False#
scanner: timApp.plugin.userselect.userselect.ScannerOptions#
selectOnce: bool = False#
sortBy: list[str]#
text: timApp.plugin.userselect.userselect.TextOptions#
class timApp.plugin.userselect.userselect.UserSelectStateModel[source]#

Bases: object

timApp.plugin.userselect.userselect.apply(username: str, task_id: str | None = None, par: timApp.document.editing.globalparid.GlobalParId | None = None, param: str | None = None) flask.wrappers.Response[source]#
timApp.plugin.userselect.userselect.apply_dist_right_actions(user_acc: timApp.user.user.User, dist_right: list[timApp.plugin.userselect.userselect.DistributeRightAction]) list[str][source]#
timApp.plugin.userselect.userselect.apply_field_actions(cur_user: timApp.user.user.User, user_acc: timApp.user.user.User, set_values: list[timApp.plugin.userselect.userselect.SetTaskValueAction]) None[source]#
timApp.plugin.userselect.userselect.apply_group_actions(user_acc: timApp.user.user.User, cur_user: timApp.user.user.User, add: list[str], remove: list[str], change_to: timApp.plugin.userselect.userselect.ChangeGroupAction | None) bool[source]#
timApp.plugin.userselect.userselect.apply_permission_actions(user_group: timApp.user.usergroup.UserGroup, add: list[timApp.plugin.userselect.userselect.AddPermission], remove: list[timApp.plugin.userselect.userselect.RemovePermission], confirm: list[timApp.plugin.userselect.userselect.ConfirmPermission], change_time: list[timApp.plugin.userselect.userselect.ChangePermissionTime]) list[str][source]#
timApp.plugin.userselect.userselect.apply_verify_session(action: str, user_acc: timApp.user.user.User, session_id: str | None, targets: list[str]) list[str][source]#
timApp.plugin.userselect.userselect.fetch_users(task_id: str | None = None, doc_id: int | None = None, par_id: str | None = None) flask.wrappers.Response[source]#
timApp.plugin.userselect.userselect.get_groups(cur_user: timApp.user.user.User, add: list[str], remove: list[str], change_all_groups: list[str]) tuple[list[timApp.user.usergroup.UserGroup], list[timApp.user.usergroup.UserGroup], list[timApp.user.usergroup.UserGroup]][source]#
timApp.plugin.userselect.userselect.get_plugin_info(username: str, task_id: Optional[str] = None, par: Optional[timApp.document.editing.globalparid.GlobalParId] = None) tuple[timApp.plugin.userselect.userselect.UserSelectMarkupModel, timApp.user.user.User, timApp.user.usergroup.UserGroup, timApp.user.user.User, timApp.document.docinfo.DocInfo][source]#
timApp.plugin.userselect.userselect.get_plugin_markup(task_id: str | None, par: timApp.document.editing.globalparid.GlobalParId | None) tuple[timApp.plugin.userselect.userselect.UserSelectMarkupModel, timApp.document.docinfo.DocInfo, timApp.user.user.User, timApp.document.viewcontext.ViewContext][source]#
timApp.plugin.userselect.userselect.has_distribution_moderation_access(doc: timApp.document.docinfo.DocInfo) bool[source]#
timApp.plugin.userselect.userselect.log_user_select(msg: str) None[source]#
timApp.plugin.userselect.userselect.match_query(query_words: list[str], keywords: list[str]) bool[source]#
timApp.plugin.userselect.userselect.needs_verify(username: str, par: timApp.document.editing.globalparid.GlobalParId) flask.wrappers.Response[source]#
timApp.plugin.userselect.userselect.reqs_handler() tim_common.pluginserver_flask.PluginReqs[source]#
timApp.plugin.userselect.userselect.search_users(search_strings: list[str], task_id: str | None = None, par: timApp.document.editing.globalparid.GlobalParId | None = None) flask.wrappers.Response[source]#
timApp.plugin.userselect.userselect.undo(username: str, task_id: str | None = None, par: timApp.document.editing.globalparid.GlobalParId | None = None, param: str | None = None) flask.wrappers.Response[source]#
timApp.plugin.userselect.userselect.undo_dist_right_actions(user_acc: timApp.user.user.User, dist_rights: list[timApp.plugin.userselect.userselect.DistributeRightAction]) list[str][source]#
timApp.plugin.userselect.userselect.undo_field_actions(cur_user: timApp.user.user.User, user_acc: timApp.user.user.User, set_value: list[timApp.plugin.userselect.userselect.SetTaskValueAction]) None[source]#
timApp.plugin.userselect.userselect.undo_group_actions(user_acc: timApp.user.user.User, cur_user: timApp.user.user.User, add: list[str], remove: list[str], change: timApp.plugin.userselect.userselect.ChangeGroupAction | None) bool[source]#

Module contents#