adhocracy_core.sheets.principal module¶
Sheets for :term:`principal`s.
-
interface
IUserBasic[source]¶ Extends:
adhocracy_core.interfaces.ISheetMarker interface for the basic user sheet.
-
class
UserBasicSchema(*arg, **kw)[source]¶ Bases:
adhocracy_core.schema.MappingSchemaBasic user sheet data structure.
This sheet must only store public information, as everyone can see it.
name: visible name
-
interface
IUserExtended[source]¶ Extends:
adhocracy_core.interfaces.ISheetMarker interface for the extended user sheet.
-
class
UserExtendedSchema(*arg, **kw)[source]¶ Bases:
adhocracy_core.schema.MappingSchemaExtended user sheet data structure.
Sensitive information (not for everyone’s eyes) should be stored here.
email: email address tzname: time zone
-
interface
IEmailNew[source]¶ Extends:
adhocracy_core.interfaces.ISheet,adhocracy_core.interfaces.ISheetRequirePasswordMarker interface for not yet activate new user email.
-
class
EmailNewSchema(*arg, **kw)[source]¶ Bases:
adhocracy_core.schema.MappingSchemaNew user mail sheet data structure.
email: email address
-
interface
IPermissions[source]¶ Extends:
adhocracy_core.interfaces.ISheetMarker interface for the permissions sheet.
-
interface
IGroup[source]¶ Extends:
adhocracy_core.interfaces.ISheetMarker interface for the group sheet.
-
interface
PermissionsGroupsReference[source]¶ Extends:
adhocracy_core.interfaces.SheetToSheetpermissions sheet reference to preceding versions.
-
class
GroupSchema(*arg, **kw)[source]¶ Bases:
adhocracy_core.schema.MappingSchemaGroup sheet data structure.
-
interface
ICaptcha[source]¶ Extends:
adhocracy_core.interfaces.ISheetMarker interface for user-submitted captcha data.
-
class
CaptchaSchema(*arg, **kw)[source]¶ Bases:
adhocracy_core.schema.MappingSchemaWraps user-submitted captcha data.
This sheet may be required when creating a new user (if captchas are turned on), but the data is discarded after validation.
id: captcha ID (generated by Thentos) solution: solution to the captcha (entered by a human user)
-
class
CaptchaSheet(meta: adhocracy_core.interfaces.SheetMetadata, context: <InterfaceClass adhocracy_core.interfaces.IResourceSheet>, registry: pyramid.registry.Registry, request: <InterfaceClass pyramid.interfaces.IRequest>=None, creating: adhocracy_core.interfaces.ResourceMetadata=None)[source]¶ Bases:
adhocracy_core.sheets.BaseResourceSheetDummy sheet that does not store any data.
-
get_group_choices(context, request) → [][source]¶ Return group choices based on the /principals/groups service.
-
class
PermissionsSchema(*arg, **kw)[source]¶ Bases:
adhocracy_core.schema.MappingSchemaPermissions sheet data structure.
groups: groups this user joined
-
class
PermissionsAttributeResourceSheet(meta: adhocracy_core.interfaces.SheetMetadata, context: <InterfaceClass adhocracy_core.interfaces.IResourceSheet>, registry: pyramid.registry.Registry, request: <InterfaceClass pyramid.interfaces.IRequest>=None, creating: adhocracy_core.interfaces.ResourceMetadata=None)[source]¶ Bases:
adhocracy_core.sheets.AttributeResourceSheetStore the groups field references also as object attribute.
-
interface
IPasswordAuthentication[source]¶ Extends:
adhocracy_core.interfaces.ISheet,adhocracy_core.interfaces.ISheetRequirePasswordMarker interface for the password sheet.
-
class
PasswordAuthenticationSchema(*arg, **kw)[source]¶ Bases:
adhocracy_core.schema.MappingSchemaData structure for password based user authentication.
password: plaintext password
adhocracy_core.schema.Password.
-
class
PasswordAuthenticationSheet(meta: adhocracy_core.interfaces.SheetMetadata, context: <InterfaceClass adhocracy_core.interfaces.IResourceSheet>, registry: pyramid.registry.Registry, request: <InterfaceClass pyramid.interfaces.IRequest>=None, creating: adhocracy_core.interfaces.ResourceMetadata=None)[source]¶ Bases:
adhocracy_core.sheets.AnnotationRessourceSheetSheet for password based user authentication.
The password data is encrypted and stored in the user object (context). This assures compatibility with
substanced.principal.User.The check_plaintext_password method can be used to validate passwords.
-
check_plaintext_password(password: str) → bool[source]¶ Check if password matches the stored encrypted password.
Raises: ValueError – if password is > 4096 bytes
-
-
class
ActivationSetting(*arg, **kw)[source]¶ Bases:
adhocracy_core.schema.SingleLineActivation setting.
Possible values: direct, registration_mail, invitation_mail
-
default= 'registration_mail'¶
-
-
interface
IActivationConfiguration[source]¶ Extends:
adhocracy_core.interfaces.ISheetMarker interface for the user activation configutation sheet.
-
class
ActivationConfigutationSchema(*arg, **kw)[source]¶ Bases:
adhocracy_core.schema.MappingSchemaData structure for user activation configuration.
activation: One of ‘direct’, ‘register’ or ‘invite’
-
interface
IAnonymizeDefault[source]¶ Extends:
adhocracy_core.interfaces.ISheetMarker interface for the user anonymize default sheet.
-
class
AnonymizeDefaultSchema(*arg, **kw)[source]¶ Bases:
adhocracy_core.schema.MappingSchemaData structure for user default anonymize setting.
anonymize: Boolean setting for anonymization default .
-
interface
IServiceKonto[source]¶ Extends:
adhocracy_core.interfaces.ISheetMarker interface for the ServiceKonto sheet.
-
class
ServiceKontoSchema(*arg, **kw)[source]¶ Bases:
adhocracy_core.schema.MappingSchemaData structure for ServiceKonto user information.
-
interface
IServiceKontoSettings[source]¶ Extends:
adhocracy_core.interfaces.ISheetMarker interface for the ServiceKonto settings sheet.
-
class
ServiceKontoSettingsSchema(*arg, **kw)[source]¶ Bases:
adhocracy_core.schema.MappingSchemaData structure for public ServiceKonto user information.