core.modules.moduleconf
¶
Module Contents¶
Classes¶
This is a Skeleton-like class that acts as a container for Skeletons used as a |
|
This is a container-object holding information about one database entity. |
|
This module is for ViUR internal purposes only. |
Functions¶
- class core.modules.moduleconf.ScriptRelSkel¶
Bases:
viur.core.skeleton.RelSkel
This is a Skeleton-like class that acts as a container for Skeletons used as a additional information data skeleton for
extendedRelationalBone
.It needs to be sub-classed where information about the kindName and its attributes (bones) are specified.
The Skeleton stores its bones in an
OrderedDict
-Instance, so the definition order of the contained bones remains constant.- name¶
- icon¶
- capable¶
- access¶
- class core.modules.moduleconf.ModuleConfSkel(*args, **kwargs)¶
Bases:
viur.core.skeleton.Skeleton
This is a container-object holding information about one database entity.
It has to be sub-classed with individual information about the kindName of the entities and its specific data attributes, the so called bones. The Skeleton stores its bones in an
OrderedDict
-Instance, so the definition order of the contained bones remains constant.- Variables:
key (server.bones.BaseBone) – This bone stores the current database key of this entity. Assigning to this bones value is dangerous and does not affect the actual key its stored in.
creationdate (server.bones.DateBone) – The date and time where this entity has been created.
changedate (server.bones.DateBone) – The date and time of the last change to this entity.
- kindName = 'viur-module-conf'¶
- _valid_tags = ['b', 'a', 'i', 'u', 'span', 'div', 'p', 'ol', 'ul', 'li', 'abbr', 'sub', 'sup', 'h1', 'h2',...¶
- _valid_html¶
- name¶
- help_text¶
- help_text_add¶
- help_text_edit¶
- scripts¶
- class core.modules.moduleconf.ModuleConf(moduleName, modulePath, *args, **kwargs)¶
Bases:
viur.core.prototypes.List
This module is for ViUR internal purposes only. It lists all other modules to be able to provide them with help texts.
- Parameters:
moduleName (str) –
modulePath (str) –
- kindName = 'viur-module-conf'¶
- accessRights = ['edit']¶
- adminInfo()¶
- canAdd()¶
Access control function for adding permission.
Checks if the current user has the permission to add a new entry.
The default behavior is: - If no user is logged in, adding is generally refused. - If the user has “root” access, adding is generally allowed. - If the user has the modules “add” permission (module-add) enabled, adding is allowed.
It should be overridden for a module-specific behavior.
See also
add()
- Returns:
True, if adding entries is allowed, False otherwise.
- canDelete(skel)¶
Access control function for delete permission.
Checks if the current user has the permission to delete an entry.
The default behavior is: - If no user is logged in, deleting is generally refused. - If the user has “root” access, deleting is generally allowed. - If the user has the modules “deleting” permission (module-delete) enabled, deleting is allowed.
It should be overridden for a module-specific behavior.
- Parameters:
skel (viur.core.skeleton.SkeletonInstance) – The Skeleton that should be deleted.
- Return type:
bool
See also
delete()
- Returns:
True, if deleting entries is allowed, False otherwise.
- Parameters:
skel (viur.core.skeleton.SkeletonInstance) –
- Return type:
bool
- classmethod get_by_module_name(module_name)¶
- Parameters:
module_name (str) –
- Return type:
None | viur.core.skeleton.SkeletonInstance
- core.modules.moduleconf.read_all_modules()¶