Ejemplo n.º 1
0
class MilestonePermission(TinaResourcePermission):
    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')
Ejemplo n.º 2
0
class EpicPermission(TinaResourcePermission):
    enought_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')
Ejemplo n.º 3
0
class ApplicationTokenPermission(TinaResourcePermission):
    retrieve_perms = IsAuthenticated() & CanUseToken()
    by_application_perms = IsAuthenticated()
    create_perms = IsAuthenticated()
    update_perms = IsAuthenticated() & CanUseToken()
    partial_update_perms = IsAuthenticated() & CanUseToken()
    destroy_perms = IsAuthenticated() & CanUseToken()
    list_perms = IsAuthenticated()
Ejemplo n.º 4
0
class UserStoryPermission(TinaResourcePermission):
    enought_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')
Ejemplo n.º 5
0
class NotifyPolicyPermission(TinaResourcePermission):
    retrieve_perms = IsAuthenticated()
    create_perms = IsAuthenticated()
    update_perms = IsAuthenticated()
    partial_update_perms = IsAuthenticated()
    destroy_perms = IsAuthenticated()
    list_perms = IsAuthenticated()
Ejemplo n.º 6
0
class UserProjectSettingsPermission(TinaResourcePermission):
    retrieve_perms = IsAuthenticated()
    create_perms = IsAuthenticated()
    update_perms = IsAuthenticated()
    partial_update_perms = IsAuthenticated()
    destroy_perms = IsAuthenticated()
    list_perms = IsAuthenticated()
Ejemplo n.º 7
0
class ImporterPermission(TinaResourcePermission):
    enought_perms = IsAuthenticated()
    global_perms = None
    auth_url_perms = IsAuthenticated()
    authorize_perms = IsAuthenticated()
    list_users_perms = IsAuthenticated()
    list_projects_perms = IsAuthenticated()
    import_project_perms = IsAuthenticated()
Ejemplo n.º 8
0
class ProjectPermission(TinaResourcePermission):
    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')
Ejemplo n.º 9
0
class StorageEntriesPermission(TinaResourcePermission):
    enought_perms = IsAuthenticated()
    global_perms = DenyAll()
Ejemplo n.º 10
0
class ImportExportPermission(TinaResourcePermission):
    import_project_perms = IsAuthenticated()
    import_item_perms = IsProjectAdmin()
    export_project_perms = IsProjectAdmin()
    load_dump_perms = IsAuthenticated()
Ejemplo n.º 11
0
class FeedbackPermission(TinaResourcePermission):
    create_perms = IsAuthenticated()
Ejemplo n.º 12
0
class ApplicationPermission(TinaResourcePermission):
    retrieve_perms = IsAuthenticated()
    token_perms = IsAuthenticated()
    list_perms = IsAuthenticated()