feriennet.security

Module Contents

Functions

is_owner(→ bool)

Returns true if the given username is the owner of the given

local_has_permission_logged_in(→ bool)

has_private_permission_logged_in(→ bool)

Take away private permission for editors. For exceptions see

has_private_permission_site_collection(→ bool)

Give editors the ability to access the site collection.

has_private_permission_image_collection(→ bool)

Give editors the ability to access the image file collection (but not

has_private_permission_activity_collections(→ bool)

Give the editor private permission for activity collections (needed

has_private_permission_activities(→ bool)

Give the editor private permission for activities.

has_private_permission_occasions(→ bool)

Give the editor private permission for occasions.

has_private_permission_notifications(→ bool)

Give the editor private permission for notification templates.

has_private_permission_notification(→ bool)

Give the editor private permission for notification templates.

has_public_permission_not_logged_in(→ bool)

Only make activites anonymously accessible with certain states.

has_public_permission_logged_in(→ bool)

Only make activites accessible with certain states (or if owner).

has_personal_permission_booking(→ bool)

Ensure that logged in users may only change their own bookings.

has_private_permission_occasion_attendee_collection(→ bool)

Ensure that organisators have access to the attendee collection.

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.