mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-05 20:23:16 +08:00
19 lines
343 B
Ruby
19 lines
343 B
Ruby
# frozen_string_literal: true
|
|
|
|
class SoftLockedRepository < Repository
|
|
# this is for repositories only editable via API
|
|
|
|
enum permission_level: Extends::SHARED_OBJECTS_PERMISSION_LEVELS.except(:shared_write)
|
|
|
|
def shareable_write?
|
|
false
|
|
end
|
|
|
|
def unlocked?
|
|
@unlocked == true
|
|
end
|
|
|
|
def unlock!
|
|
@unlocked = true
|
|
end
|
|
end
|