class ProjectTemplatePermission(TuesmonResourcePermission): retrieve_perms = AllowAny() create_perms = IsSuperUser() update_perms = IsSuperUser() partial_update_perms = IsSuperUser() destroy_perms = IsSuperUser() list_perms = AllowAny()
class WikiPagePermission(TuesmonResourcePermission): enought_perms = IsProjectAdmin() | IsSuperUser() global_perms = None retrieve_perms = HasProjectPerm('view_wiki_pages') by_slug_perms = HasProjectPerm('view_wiki_pages') create_perms = HasProjectPerm('add_wiki_page') update_perms = CommentAndOrUpdatePerm('modify_wiki_page', 'comment_wiki_page') partial_update_perms = CommentAndOrUpdatePerm('modify_wiki_page', 'comment_wiki_page') destroy_perms = HasProjectPerm('delete_wiki_page') list_perms = AllowAny() render_perms = AllowAny() watch_perms = IsAuthenticated() & HasProjectPerm('view_wiki_pages') unwatch_perms = IsAuthenticated() & HasProjectPerm('view_wiki_pages')
class RolesPermission(TuesmonResourcePermission): retrieve_perms = HasProjectPerm('view_project') create_perms = IsProjectAdmin() update_perms = IsProjectAdmin() partial_update_perms = IsProjectAdmin() destroy_perms = IsProjectAdmin() list_perms = AllowAny()
class SlackHookPermission(TuesmonResourcePermission): retrieve_perms = IsProjectAdmin() create_perms = IsProjectAdmin() update_perms = IsProjectAdmin() destroy_perms = IsProjectAdmin() list_perms = AllowAny() test_perms = IsProjectAdmin()
class WikiAttachmentPermission(TuesmonResourcePermission): retrieve_perms = HasProjectPerm('view_wiki_pages') | IsAttachmentOwnerPerm() create_perms = HasProjectPerm('modify_wiki_page') | (CommentAttachmentPerm() & HasProjectPerm('comment_wiki_page')) update_perms = HasProjectPerm('modify_wiki_page') | IsAttachmentOwnerPerm() partial_update_perms = HasProjectPerm('modify_wiki_page') | IsAttachmentOwnerPerm() destroy_perms = HasProjectPerm('modify_wiki_page') | IsAttachmentOwnerPerm() list_perms = AllowAny()
class UserStoryDueDatePermission(TuesmonResourcePermission): retrieve_perms = HasProjectPerm('view_project') create_perms = IsProjectAdmin() update_perms = IsProjectAdmin() partial_update_perms = IsProjectAdmin() destroy_perms = IsProjectAdmin() list_perms = AllowAny() bulk_update_order_perms = IsProjectAdmin()
class MembershipPermission(TuesmonResourcePermission): retrieve_perms = HasProjectPerm('view_project') create_perms = IsProjectAdmin() update_perms = IsProjectAdmin() partial_update_perms = IsProjectAdmin() destroy_perms = IsProjectAdmin() list_perms = AllowAny() bulk_create_perms = IsProjectAdmin() resend_invitation_perms = IsProjectAdmin()
class TaskPermission(TuesmonResourcePermission): enought_perms = IsProjectAdmin() | IsSuperUser() global_perms = None retrieve_perms = HasProjectPerm('view_tasks') create_perms = HasProjectPerm('add_task') update_perms = CommentAndOrUpdatePerm('modify_task', 'comment_task') partial_update_perms = CommentAndOrUpdatePerm('modify_task', 'comment_task') destroy_perms = HasProjectPerm('delete_task') list_perms = AllowAny() filters_data_perms = AllowAny() csv_perms = AllowAny() bulk_create_perms = HasProjectPerm('add_task') bulk_update_order_perms = HasProjectPerm('modify_task') bulk_update_milestone_perms = HasProjectPerm('modify_task') upvote_perms = IsAuthenticated() & HasProjectPerm('view_tasks') downvote_perms = IsAuthenticated() & HasProjectPerm('view_tasks') watch_perms = IsAuthenticated() & HasProjectPerm('view_tasks') unwatch_perms = IsAuthenticated() & HasProjectPerm('view_tasks')
class WikiLinkPermission(TuesmonResourcePermission): enought_perms = IsProjectAdmin() | IsSuperUser() global_perms = None retrieve_perms = HasProjectPerm('view_wiki_links') create_perms = HasProjectPerm('add_wiki_link') update_perms = HasProjectPerm('modify_wiki_link') partial_update_perms = HasProjectPerm('modify_wiki_link') destroy_perms = HasProjectPerm('delete_wiki_link') list_perms = AllowAny() create_wiki_page_perms = HasProjectPerm('add_wiki_page')
class UserPermission(TuesmonResourcePermission): enought_perms = IsSuperUser() global_perms = None retrieve_perms = AllowAny() by_username_perms = retrieve_perms update_perms = IsTheSameUser() partial_update_perms = IsTheSameUser() destroy_perms = IsTheSameUser() list_perms = AllowAny() stats_perms = AllowAny() password_recovery_perms = AllowAny() change_password_from_recovery_perms = AllowAny() change_password_perms = IsAuthenticated() change_avatar_perms = IsAuthenticated() me_perms = IsAuthenticated() remove_avatar_perms = IsAuthenticated() change_email_perms = AllowAny() contacts_perms = AllowAny() liked_perms = AllowAny() voted_perms = AllowAny() watched_perms = AllowAny()
class MilestonePermission(TuesmonResourcePermission): enought_perms = IsProjectAdmin() | IsSuperUser() global_perms = None retrieve_perms = HasProjectPerm('view_milestones') create_perms = HasProjectPerm('add_milestone') update_perms = HasProjectPerm('modify_milestone') partial_update_perms = HasProjectPerm('modify_milestone') destroy_perms = HasProjectPerm('delete_milestone') list_perms = AllowAny() stats_perms = HasProjectPerm('view_milestones') watch_perms = IsAuthenticated() & HasProjectPerm('view_milestones') unwatch_perms = IsAuthenticated() & HasProjectPerm('view_milestones') move_related_items_perms = HasProjectPerm('modify_milestone') move_uss_to_sprint_perms = HasProjectPerm('modify_us') move_tasks_to_sprint_perms = HasProjectPerm('modify_task') move_issues_to_sprint_perms = HasProjectPerm('modify_issue')
class ProjectPermission(TuesmonResourcePermission): retrieve_perms = HasProjectPerm('view_project') by_slug_perms = HasProjectPerm('view_project') create_perms = IsAuthenticated() update_perms = IsProjectAdmin() partial_update_perms = IsProjectAdmin() destroy_perms = IsProjectAdmin() modules_perms = IsProjectAdmin() list_perms = AllowAny() change_logo_perms = IsProjectAdmin() remove_logo_perms = IsProjectAdmin() stats_perms = HasProjectPerm('view_project') member_stats_perms = HasProjectPerm('view_project') issues_stats_perms = HasProjectPerm('view_project') regenerate_epics_csv_uuid_perms = IsProjectAdmin() regenerate_userstories_csv_uuid_perms = IsProjectAdmin() regenerate_issues_csv_uuid_perms = IsProjectAdmin() regenerate_tasks_csv_uuid_perms = IsProjectAdmin() delete_epics_csv_uuid_perms = IsProjectAdmin() delete_userstories_csv_uuid_perms = IsProjectAdmin() delete_issues_csv_uuid_perms = IsProjectAdmin() delete_tasks_csv_uuid_perms = IsProjectAdmin() tags_perms = HasProjectPerm('view_project') tags_colors_perms = HasProjectPerm('view_project') like_perms = IsAuthenticated() & HasProjectPerm('view_project') unlike_perms = IsAuthenticated() & HasProjectPerm('view_project') watch_perms = IsAuthenticated() & HasProjectPerm('view_project') unwatch_perms = IsAuthenticated() & HasProjectPerm('view_project') create_template_perms = IsSuperUser() leave_perms = CanLeaveProject() transfer_validate_token_perms = IsAuthenticated() & HasProjectPerm('view_project') transfer_request_perms = IsProjectAdmin() transfer_start_perms = IsObjectOwner() transfer_reject_perms = IsAuthenticated() & HasProjectPerm('view_project') transfer_accept_perms = IsAuthenticated() & HasProjectPerm('view_project') create_tag_perms = IsProjectAdmin() edit_tag_perms = IsProjectAdmin() delete_tag_perms = IsProjectAdmin() mix_tags_perms = IsProjectAdmin() duplicate_perms = IsAuthenticated() & HasProjectPerm('view_project')
class WebhookLogPermission(TuesmonResourcePermission): retrieve_perms = IsWebhookProjectAdmin() list_perms = AllowAny() resend_perms = IsWebhookProjectAdmin()
class AuthPermission(TuesmonResourcePermission): create_perms = AllowAny() register_perms = AllowAny()
class LocalesPermission(TuesmonResourcePermission): global_perms = AllowAny()
class UserTimelinePermission(TuesmonResourcePermission): enought_perms = IsSuperUser() global_perms = None retrieve_perms = AllowAny()