Class: LfsFileLock
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- LfsFileLock
- Defined in:
- app/models/lfs_file_lock.rb
Constant Summary
Constants inherited from ApplicationRecord
Constants included from ResetOnUnionError
ResetOnUnionError::MAX_RESET_PERIOD
Instance Method Summary collapse
Methods inherited from ApplicationRecord
cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order
Methods included from SensitiveSerializableHash
Instance Method Details
#can_be_unlocked_by?(current_user, forced = false) ⇒ Boolean
9 10 11 12 13 |
# File 'app/models/lfs_file_lock.rb', line 9 def can_be_unlocked_by?(current_user, forced = false) return true if current_user.id == user_id forced && current_user.can?(:admin_project, project) end |