feriennet.security
Functions
|
Returns true if the given username is the owner of the given |
|
|
|
Take away private permission for editors. For exceptions see |
Give editors the ability to access the site collection. |
|
Give editors the ability to access the image file collection (but not |
|
Give the editor private permission for activity collections (needed |
|
Give the editor private permission for activities. |
|
|
Give the editor private permission for occasions. |
Give the editor private permission for notification templates. |
|
Give the editor private permission for notification templates. |
|
Only make activites anonymously accessible with certain states. |
|
|
Only make activites accessible with certain states (or if owner). |
|
Ensure that logged in users may only change their own bookings. |
Ensure that organisators have access to the attendee collection. |
Module Contents
- feriennet.security.is_owner(username: str, activity: onegov.activity.Activity) bool [source]
Returns true if the given username is the owner of the given activity.
- feriennet.security.local_has_permission_logged_in(app: onegov.feriennet.FeriennetApp, identity: morepath.authentication.Identity, model: object, permission: object) bool [source]
- feriennet.security.has_private_permission_logged_in(app: onegov.feriennet.FeriennetApp, identity: morepath.authentication.Identity, model: object, permission: type[onegov.core.security.Private]) bool [source]
Take away private permission for editors. For exceptions see the permission rules below.
- feriennet.security.has_private_permission_site_collection(app: onegov.feriennet.FeriennetApp, identity: morepath.authentication.Identity, model: onegov.org.models.SiteCollection, permission: type[onegov.core.security.Private]) bool [source]
Give editors the ability to access the site collection.
- feriennet.security.has_private_permission_image_collection(app: onegov.feriennet.FeriennetApp, identity: morepath.authentication.Identity, model: onegov.org.models.ImageFileCollection, permission: type[onegov.core.security.Private]) bool [source]
Give editors the ability to access the image file collection (but not the file collection!).
- feriennet.security.has_private_permission_activity_collections(app: onegov.feriennet.FeriennetApp, identity: morepath.authentication.Identity, model: onegov.activity.ActivityCollection[Any], permission: type[onegov.core.security.Private]) bool [source]
Give the editor private permission for activity collections (needed to create new activites).
- feriennet.security.has_private_permission_activities(app: onegov.feriennet.FeriennetApp, identity: morepath.authentication.Identity, model: onegov.activity.Activity, permission: type[onegov.core.security.Private]) bool [source]
Give the editor private permission for activities.
- feriennet.security.has_private_permission_occasions(app: onegov.feriennet.FeriennetApp, identity: morepath.authentication.Identity, model: onegov.activity.Occasion, permission: type[onegov.core.security.Private]) bool [source]
Give the editor private permission for occasions.
- feriennet.security.has_private_permission_notifications(app: onegov.feriennet.FeriennetApp, identity: morepath.authentication.Identity, model: onegov.feriennet.collections.NotificationTemplateCollection, permission: type[onegov.core.security.Private]) bool [source]
Give the editor private permission for notification templates.
- feriennet.security.has_private_permission_notification(app: onegov.feriennet.FeriennetApp, identity: morepath.authentication.Identity, model: onegov.feriennet.models.NotificationTemplate, permission: type[onegov.core.security.Private]) bool [source]
Give the editor private permission for notification templates.
- feriennet.security.has_public_permission_not_logged_in(app: onegov.feriennet.FeriennetApp, identity: NoIdentity | None, model: onegov.activity.Activity, permission: type[onegov.core.security.Public]) bool [source]
Only make activites anonymously accessible with certain states.
- feriennet.security.has_public_permission_logged_in(app: onegov.feriennet.FeriennetApp, identity: morepath.authentication.Identity, model: onegov.activity.Activity, permission: type[onegov.core.security.Public]) bool [source]
Only make activites accessible with certain states (or if owner).
- feriennet.security.has_personal_permission_booking(app: onegov.feriennet.FeriennetApp, identity: morepath.authentication.Identity, model: onegov.activity.Booking, permission: type[onegov.core.security.Personal]) bool [source]
Ensure that logged in users may only change their own bookings.
- feriennet.security.has_private_permission_occasion_attendee_collection(app: onegov.feriennet.FeriennetApp, identity: morepath.authentication.Identity, model: onegov.feriennet.collections.OccasionAttendeeCollection, permission: type[onegov.core.security.Private]) bool [source]
Ensure that organisators have access to the attendee collection.