BigW Consortium Gitlab
1. Previously, we were not removing existing access levels before creating new ones. This is not a problem for EE, but _is_ for CE, since we restrict the number of access levels in CE to 1. 2. The correct approach is: CE -> delete all access levels before updating a protected branch EE -> delete developer access levels if "developers_can_{merge,push}" is switched off 3. The dispatch is performed by checking if a "length: 1" validation is present on the access levels or not. 4. Another source of problems was that we didn't put multiple queries in a transaction. If the `destroy_all` passes, but the `update` fails, we should have a rollback. 5. Modifying the API to provide users direct access to CRUD access levels will make things a lot simpler. 6. Create `create/update` services separately for this API, which perform the necessary data translation, before calling the regular `create/update` services. The translation code was getting too large for the API endpoint itself, so this move makes sense.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
access_requests_spec.rb | Loading commit data... | |
api_helpers_spec.rb | Loading commit data... | |
award_emoji_spec.rb | Loading commit data... | |
boards_spec.rb | Loading commit data... | |
branches_spec.rb | Loading commit data... | |
broadcast_messages_spec.rb | Loading commit data... | |
builds_spec.rb | Loading commit data... | |
commit_statuses_spec.rb | Loading commit data... | |
commits_spec.rb | Loading commit data... | |
deploy_keys_spec.rb | Loading commit data... | |
deployments_spec.rb | Loading commit data... | |
doorkeeper_access_spec.rb | Loading commit data... | |
environments_spec.rb | Loading commit data... | |
files_spec.rb | Loading commit data... | |
fork_spec.rb | Loading commit data... | |
groups_spec.rb | Loading commit data... | |
internal_spec.rb | Loading commit data... | |
issues_spec.rb | Loading commit data... | |
keys_spec.rb | Loading commit data... | |
labels_spec.rb | Loading commit data... | |
lint_spec.rb | Loading commit data... | |
members_spec.rb | Loading commit data... | |
merge_request_diffs_spec.rb | Loading commit data... | |
merge_requests_spec.rb | Loading commit data... | |
milestones_spec.rb | Loading commit data... | |
namespaces_spec.rb | Loading commit data... | |
notes_spec.rb | Loading commit data... | |
notification_settings_spec.rb | Loading commit data... | |
oauth_tokens_spec.rb | Loading commit data... | |
pipelines_spec.rb | Loading commit data... | |
project_hooks_spec.rb | Loading commit data... | |
project_snippets_spec.rb | Loading commit data... | |
projects_spec.rb | Loading commit data... | |
repositories_spec.rb | Loading commit data... | |
runners_spec.rb | Loading commit data... | |
services_spec.rb | Loading commit data... | |
session_spec.rb | Loading commit data... | |
settings_spec.rb | Loading commit data... | |
sidekiq_metrics_spec.rb | Loading commit data... | |
system_hooks_spec.rb | Loading commit data... | |
tags_spec.rb | Loading commit data... | |
templates_spec.rb | Loading commit data... | |
todos_spec.rb | Loading commit data... | |
triggers_spec.rb | Loading commit data... | |
users_spec.rb | Loading commit data... | |
variables_spec.rb | Loading commit data... | |
version_spec.rb | Loading commit data... |