Пример #1
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 = IsAuthenticated()
    render_perms = IsAuthenticated()
    watch_perms = IsAuthenticated() & HasProjectPerm('view_wiki_pages')
    unwatch_perms = IsAuthenticated() & HasProjectPerm('view_wiki_pages')
Пример #2
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')
Пример #3
0
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()
    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')
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")
Пример #5
0
class UserStoryPermission(TaigaResourcePermission):
    enough_perms = IsProjectAdmin() | IsSuperUser()
    global_perms = None
    retrieve_perms = HasProjectPerm('view_us')
    by_ref_perms = HasProjectPerm('view_us')
    create_perms = HasProjectPerm('add_us_to_project') | HasProjectPerm('add_us')
    update_perms = CommentAndOrUpdatePerm('modify_us', 'comment_us')
    partial_update_perms = CommentAndOrUpdatePerm('modify_us', 'comment_us')
    destroy_perms = HasProjectPerm('delete_us')
    list_perms = AllowAny()
    filters_data_perms = AllowAny()
    csv_perms = AllowAny()
    bulk_create_perms = IsAuthenticated() & (HasProjectPerm('add_us_to_project') | HasProjectPerm('add_us'))
    bulk_update_order_perms = HasProjectPerm('modify_us')
    bulk_update_milestone_perms = HasProjectPerm('modify_us')
    upvote_perms = IsAuthenticated() & HasProjectPerm('view_us')
    downvote_perms = IsAuthenticated() & HasProjectPerm('view_us')
    watch_perms = IsAuthenticated() & HasProjectPerm('view_us')
    unwatch_perms = IsAuthenticated() & HasProjectPerm('view_us')
Пример #6
0
class IssuePermission(TaigaResourcePermission):
    enought_perms = IsProjectAdmin() | IsSuperUser()
    global_perms = None
    retrieve_perms = HasProjectPerm('view_issues')
    create_perms = HasProjectPerm('add_issue')
    update_perms = CommentAndOrUpdatePerm('modify_issue', 'comment_issue')
    partial_update_perms = CommentAndOrUpdatePerm('modify_issue',
                                                  'comment_issue')
    destroy_perms = HasProjectPerm('delete_issue')
    list_perms = AllowAny()
    filters_data_perms = AllowAny()
    csv_perms = AllowAny()
    bulk_create_perms = HasProjectPerm('add_issue')
    bulk_update_milestone_perms = HasProjectPerm('modify_issue')
    delete_comment_perms = HasProjectPerm('modify_issue')
    upvote_perms = IsAuthenticated() & HasProjectPerm('view_issues')
    downvote_perms = IsAuthenticated() & HasProjectPerm('view_issues')
    watch_perms = IsAuthenticated() & HasProjectPerm('view_issues')
    unwatch_perms = IsAuthenticated() & HasProjectPerm('view_issues')
    promote_to_us_perms = IsAuthenticated() & HasProjectPerm('add_us')