Beispiel #1
0
class ProjectTemplatePermission(TaigaResourcePermission):
    retrieve_perms = AllowAny()
    create_perms = IsSuperUser()
    update_perms = IsSuperUser()
    partial_update_perms = IsSuperUser()
    destroy_perms = IsSuperUser()
    list_perms = AllowAny()
Beispiel #2
0
class WikiPagePermission(TaigaResourcePermission):
    enought_perms = IsProjectOwner() | IsSuperUser()
    global_perms = None
    retrieve_perms = HasProjectPerm('view_wiki_pages')
    create_perms = HasProjectPerm('add_wiki_page')
    update_perms = HasProjectPerm('modify_wiki_page')
    partial_update_perms = HasProjectPerm('modify_wiki_page')
    destroy_perms = HasProjectPerm('delete_wiki_page')
    list_perms = AllowAny()
    render_perms = AllowAny()
Beispiel #3
0
class UserStoryPermission(TaigaResourcePermission):
    retrieve_perms = HasProjectPerm('view_us')
    create_perms = HasProjectPerm('add_us_to_project') | HasProjectPerm('add_us')
    update_perms = HasProjectPerm('modify_us')
    partial_update_perms = HasProjectPerm('modify_us')
    destroy_perms = HasProjectPerm('delete_us')
    list_perms = AllowAny()
    csv_perms = AllowAny()
    bulk_create_perms = IsAuthenticated() & (HasProjectPerm('add_us_to_project') | HasProjectPerm('add_us'))
    bulk_update_order_perms = HasProjectPerm('modify_us')
Beispiel #4
0
class TaskPermission(TaigaResourcePermission):
    enought_perms = IsProjectOwner() | IsSuperUser()
    global_perms = None
    retrieve_perms = HasProjectPerm('view_tasks')
    create_perms = HasProjectPerm('add_task')
    update_perms = HasProjectPerm('modify_task')
    destroy_perms = HasProjectPerm('delete_task')
    list_perms = AllowAny()
    csv_perms = AllowAny()
    bulk_create_perms = HasProjectPerm('add_task')
    bulk_update_order_perms = HasProjectPerm('modify_task')
Beispiel #5
0
class IssuePermission(TaigaResourcePermission):
    enought_perms = IsProjectOwner() | IsSuperUser()
    global_perms = None
    retrieve_perms = HasProjectPerm('view_issues')
    create_perms = HasProjectPerm('add_issue')
    update_perms = HasProjectPerm('modify_issue')
    destroy_perms = HasProjectPerm('delete_issue')
    list_perms = AllowAny()
    csv_perms = AllowAny()
    upvote_perms = IsAuthenticated() & HasProjectPerm('vote_issues')
    downvote_perms = IsAuthenticated() & HasProjectPerm('vote_issues')
    bulk_create_perms = HasProjectPerm('add_issue')
    delete_comment_perms = HasProjectPerm('modify_issue')
Beispiel #6
0
class WikiPagePermission(TaigaResourcePermission):
    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')
Beispiel #7
0
class UserPermission(TaigaResourcePermission):
    enought_perms = IsSuperUser()
    global_perms = None
    retrieve_perms = IsTheSameUser()
    update_perms = IsTheSameUser()
    destroy_perms = IsTheSameUser()
    list_perms = AllowAny()
    password_recovery_perms = AllowAny()
    change_password_from_recovery_perms = AllowAny()
    change_password_perms = IsAuthenticated()
    change_avatar_perms = IsAuthenticated()
    remove_avatar_perms = IsAuthenticated()
    starred_perms = AllowAny()
    change_email_perms = IsTheSameUser()
Beispiel #8
0
class ProjectPermission(TaigaResourcePermission):
    retrieve_perms = HasProjectPerm('view_project')
    create_perms = IsAuthenticated()
    update_perms = IsProjectOwner()
    destroy_perms = IsProjectOwner()
    list_perms = AllowAny()
    stats_perms = AllowAny()
    star_perms = IsAuthenticated()
    unstar_perms = IsAuthenticated()
    issues_stats_perms = AllowAny()
    issues_filters_data_perms = AllowAny()
    tags_perms = HasProjectPerm('view_project')
    tags_colors_perms = HasProjectPerm('view_project')
    fans_perms = HasProjectPerm('view_project')
    create_template_perms = IsSuperUser()
Beispiel #9
0
class BankHolidaysPermission(TaigaResourcePermission):
    retrieve_perms = IsProjectAdmin()
    create_perms = IsProjectAdmin()
    update_perms = IsProjectAdmin()
    destroy_perms = IsProjectAdmin()
    list_perms = AllowAny()
    test_perms = IsProjectAdmin()
Beispiel #10
0
class SwimlaneUserStoryStatusPermission(TaigaResourcePermission):
    retrieve_perms = HasProjectPerm('view_project')
    create_perms = DenyAll()
    update_perms = IsProjectAdmin()
    partial_update_perms = IsProjectAdmin()
    destroy_perms =  DenyAll()
    list_perms = AllowAny()
Beispiel #11
0
class EpicPermission(TaigaResourcePermission):
    enough_perms = IsProjectAdmin() | IsSuperUser()
    global_perms = None
    retrieve_perms = HasProjectPerm('view_epics')
    create_perms = HasProjectPerm('add_epic')
    update_perms = CommentAndOrUpdatePerm('modify_epic', 'comment_epic')
    partial_update_perms = CommentAndOrUpdatePerm('modify_epic', 'comment_epic')
    destroy_perms = HasProjectPerm('delete_epic')
    list_perms = AllowAny()
    filters_data_perms = AllowAny()
    csv_perms = AllowAny()
    bulk_create_perms = HasProjectPerm('add_epic')
    upvote_perms = IsAuthenticated() & HasProjectPerm('view_epics')
    downvote_perms = IsAuthenticated() & HasProjectPerm('view_epics')
    watch_perms = IsAuthenticated() & HasProjectPerm('view_epics')
    unwatch_perms = IsAuthenticated() & HasProjectPerm('view_epics')
class TaskPermission(TaigaResourcePermission):
    enought_perms = IsProjectAdmin() | IsSuperUser()
    global_perms = None
    retrieve_perms = HasProjectPerm('view_tasks')
    create_perms = HasProjectPerm('add_task')
    update_perms = HasProjectPerm('modify_task')
    partial_update_perms = HasProjectPerm('modify_task')
    destroy_perms = HasProjectPerm('delete_task')
    list_perms = AllowAny()
    csv_perms = AllowAny()
    bulk_create_perms = HasProjectPerm('add_task')
    bulk_update_order_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')
Beispiel #13
0
class UserStoryStatusPermission(TaigaResourcePermission):
    retrieve_perms = HasProjectPerm('view_project')
    create_perms = IsProjectOwner()
    update_perms = IsProjectOwner()
    destroy_perms = IsProjectOwner()
    list_perms = AllowAny()
    bulk_update_order_perms = IsProjectOwner()
Beispiel #14
0
class ProjectPermission(TaigaResourcePermission):
    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_userstories_csv_uuid_perms = IsProjectAdmin()
    regenerate_issues_csv_uuid_perms = IsProjectAdmin()
    regenerate_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 = IsMainOwner()
    transfer_reject_perms = IsAuthenticated() & HasProjectPerm('view_project')
    transfer_accept_perms = IsAuthenticated() & HasProjectPerm('view_project')
class LetsChatHookPermission(TaigaResourcePermission):
    retrieve_perms = IsProjectOwner()
    create_perms = IsProjectOwner()
    update_perms = IsProjectOwner()
    destroy_perms = IsProjectOwner()
    list_perms = AllowAny()
    test_perms = IsProjectOwner()
Beispiel #16
0
class WikiAttachmentPermission(TaigaResourcePermission):
    retrieve_perms = HasProjectPerm('view_wiki_pages') | IsAttachmentOwnerPerm()
    create_perms = HasProjectPerm('modify_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()
Beispiel #17
0
class RolesPermission(TaigaResourcePermission):
    retrieve_perms = HasProjectPerm('view_project')
    create_perms = IsProjectAdmin()
    update_perms = IsProjectAdmin()
    partial_update_perms = IsProjectAdmin()
    destroy_perms = IsProjectAdmin()
    list_perms = AllowAny()
class DingTalkHookPermission(TaigaResourcePermission):
    retrieve_perms = IsProjectAdmin()
    create_perms = IsProjectAdmin()
    update_perms = IsProjectAdmin()
    destroy_perms = IsProjectAdmin()
    list_perms = AllowAny()
    test_perms = IsProjectAdmin()
Beispiel #19
0
class IssueTypePermission(TaigaResourcePermission):
    retrieve_perms = HasProjectPerm('view_project')
    create_perms = IsProjectOwner()
    update_perms = IsProjectOwner()
    partial_update_perms = IsProjectOwner()
    destroy_perms = IsProjectOwner()
    list_perms = AllowAny()
    bulk_update_order_perms = IsProjectOwner()
Beispiel #20
0
class WebhookPermission(TaigaResourcePermission):
    retrieve_perms = IsProjectAdmin()
    create_perms = IsProjectAdmin()
    update_perms = IsProjectAdmin()
    partial_update_perms = IsProjectAdmin()
    destroy_perms = IsProjectAdmin()
    list_perms = AllowAny()
    test_perms = IsProjectAdmin()
class IssueDueDatePermission(TaigaResourcePermission):
    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()
Beispiel #22
0
class MembershipPermission(TaigaResourcePermission):
    retrieve_perms = HasProjectPerm('view_project')
    create_perms = IsProjectOwner()
    update_perms = IsProjectOwner()
    destroy_perms = IsProjectOwner()
    list_perms = AllowAny()
    bulk_create_perms = IsProjectOwner()
    resend_invitation_perms = IsProjectOwner()
Beispiel #23
0
class TaskAttachmentPermission(TaigaResourcePermission):
    retrieve_perms = HasProjectPerm("view_tasks") | IsAttachmentOwnerPerm()
    create_perms = HasProjectPerm("modify_task") | (
        CommentAttachmentPerm() & HasProjectPerm("comment_task"))
    update_perms = HasProjectPerm("modify_task") | IsAttachmentOwnerPerm()
    partial_update_perms = HasProjectPerm(
        "modify_task") | IsAttachmentOwnerPerm()
    destroy_perms = HasProjectPerm("modify_task") | IsAttachmentOwnerPerm()
    list_perms = AllowAny()
Beispiel #24
0
class MilestonePermission(TaigaResourcePermission):
    enought_perms = IsProjectOwner() | IsSuperUser()
    global_perms = None
    retrieve_perms = HasProjectPerm('view_milestones')
    create_perms = HasProjectPerm('add_milestone')
    update_perms = HasProjectPerm('modify_milestone')
    destroy_perms = HasProjectPerm('delete_milestone')
    list_perms = AllowAny()
    stats_perms = HasProjectPerm('view_milestones')
Beispiel #25
0
class WikiLinkPermission(TaigaResourcePermission):
    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()
Beispiel #26
0
class IssueCustomAttributePermission(TaigaResourcePermission):
    enought_perms = IsProjectOwner() | IsSuperUser()
    global_perms = None
    retrieve_perms = HasProjectPerm('view_project')
    create_perms = IsProjectOwner()
    update_perms = IsProjectOwner()
    destroy_perms = IsProjectOwner()
    list_perms = AllowAny()
    bulk_update_order_perms = IsProjectOwner()
Beispiel #27
0
class IssueAttachmentPermission(TaigaResourcePermission):
    retrieve_perms = HasProjectPerm('view_issues') | IsAttachmentOwnerPerm()
    create_perms = HasProjectPerm('modify_issue') | (
        CommentAttachmentPerm() & HasProjectPerm('comment_issue'))
    update_perms = HasProjectPerm('modify_issue') | IsAttachmentOwnerPerm()
    partial_update_perms = HasProjectPerm(
        'modify_issue') | IsAttachmentOwnerPerm()
    destroy_perms = HasProjectPerm('modify_issue') | IsAttachmentOwnerPerm()
    list_perms = AllowAny()
class MembershipPermission(TaigaResourcePermission):
    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(TaigaResourcePermission):
    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 TaskCustomAttributePermission(TaigaResourcePermission):
    enought_perms = IsProjectAdmin() | IsSuperUser()
    global_perms = None
    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()