# any user with "manage" permission can un-freeze.
UnfreezeProjectRequiresAdmin: false
+ # (Experimental) Use row-level locking on update API calls.
+ LockBeforeUpdate: false
+
Users:
# Config parameters to automatically setup new users. If enabled,
# this users will be able to self-activate. Enable this if you want
"API.FreezeProjectRequiresDescription": true,
"API.FreezeProjectRequiresProperties": true,
"API.FreezeProjectRequiresProperties.*": true,
+ "API.LockBeforeUpdate": false,
"API.KeepServiceRequestTimeout": false,
"API.MaxConcurrentRequests": false,
"API.MaxIndexDatabaseRead": false,
FreezeProjectRequiresDescription bool
FreezeProjectRequiresProperties StringSet
UnfreezeProjectRequiresAdmin bool
+ LockBeforeUpdate bool
}
AuditLogs struct {
MaxAge Duration
"SystemRootToken": auth_token('system_user'),
"API": {
"RequestTimeout": "30s",
+ "LockBeforeUpdate": True,
},
"Login": {
"Test": {
@filters = []
@objects = nil
find_objects_for_index
- if with_lock
+ if with_lock && Rails.configuration.API.LockBeforeUpdate
@object = @objects.lock.first
else
@object = @objects.first
@filters = [['uuid', '=', uuid_param]]
find_objects_for_index
query = @objects
- if with_lock
+ if with_lock && Rails.configuration.API.LockBeforeUpdate
query = query.lock
end
@object = query.first
select_attrs = (@select || ["manifest_text"]) | ["portable_data_hash", "trash_at"]
model = Collection
- if with_lock
+ if with_lock && Rails.configuration.API.LockBeforeUpdate
model = model.lock
end
if c = model.
# user or (b) its head_uuid is an object the current_user
# can_manage.
model = Link
- if with_lock
+ if with_lock && Rails.configuration.API.LockBeforeUpdate
model = model.lock
end
link = model.unscoped.where(uuid: params[:uuid]).first