Commit 2e63c8b6 authored by Constance Okoghenun's avatar Constance Okoghenun

Added conditional loading of protected tag bundles

parent 1c03aace
......@@ -13,6 +13,7 @@
-# Those are used throughout the actual views. These `shared` views are then
-# reused in EE.
- if @project.feature_available?(:protected_refs_for_users, current_user)
.js-protected-refs-for-users
= render "projects/protected_branches/ee/index"
= render "projects/protected_tags/ee/index"
- else
......
......@@ -3,14 +3,21 @@ import UsersSelect from '~/users_select';
import UserCallout from '~/user_callout';
import initSettingsPanels from '~/settings_panels';
import initDeployKeys from '~/deploy_keys';
import ProtectedTagCreate from 'ee/protected_tags/protected_tag_create';
import ProtectedTagEditList from 'ee/protected_tags/protected_tag_edit_list';
import ProtectedTagCreateEE from 'ee/protected_tags/protected_tag_create';
import ProtectedTagEditListEE from 'ee/protected_tags/protected_tag_edit_list';
import ProtectedTagCreateCE from '~/protected_tags/protected_tag_create';
import ProtectedTagEditListCE from '~/protected_tags/protected_tag_edit_list';
document.addEventListener('DOMContentLoaded', () => {
new UsersSelect();
new UserCallout();
new ProtectedTagCreate();
new ProtectedTagEditList();
if (document.querySelector('.js-protected-refs-for-users')) {
new ProtectedTagCreateEE();
new ProtectedTagEditListEE();
} else {
new ProtectedTagCreateCE();
new ProtectedTagEditListCE();
}
initDeployKeys();
initSettingsPanels();
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment