2021-08-13 20:07:01 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class LinkedRepository < Repository
|
2023-12-13 22:31:21 +08:00
|
|
|
enum permission_level: Extends::SHARED_OBJECTS_PERMISSION_LEVELS.except(:shared_write)
|
|
|
|
|
|
|
|
def shareable_write?
|
|
|
|
false
|
|
|
|
end
|
|
|
|
|
2021-08-13 20:07:01 +08:00
|
|
|
def default_table_state
|
|
|
|
state = Constants::REPOSITORY_TABLE_DEFAULT_STATE.deep_dup
|
|
|
|
state['order'] = [[3, 'asc']]
|
|
|
|
state['ColReorder'] << state['ColReorder'].length
|
|
|
|
state['columns'].insert(1, Constants::REPOSITORY_TABLE_STATE_CUSTOM_COLUMN_TEMPLATE)
|
|
|
|
state
|
|
|
|
end
|
2021-08-20 19:14:18 +08:00
|
|
|
|
|
|
|
def default_sortable_columns
|
|
|
|
[
|
|
|
|
'assigned',
|
|
|
|
'repository_rows.id',
|
|
|
|
'repository_rows.name',
|
2024-05-22 23:23:39 +08:00
|
|
|
'relationships',
|
2021-08-20 19:14:18 +08:00
|
|
|
'repository_rows.created_at',
|
|
|
|
'users.full_name',
|
2024-05-22 23:23:39 +08:00
|
|
|
'repository_rows.updated_at',
|
|
|
|
'last_modified_bies_repository_rows.full_name',
|
2021-08-20 19:14:18 +08:00
|
|
|
'repository_rows.archived_on',
|
2023-12-13 23:18:56 +08:00
|
|
|
'archived_bies_repository_rows.full_name',
|
|
|
|
'repository_rows.external_id'
|
2021-08-20 19:14:18 +08:00
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
def default_search_fileds
|
|
|
|
super << 'repository_rows.external_id'
|
|
|
|
end
|
2021-08-13 20:07:01 +08:00
|
|
|
end
|