Commit f306ede8 authored by Sam Beckham's avatar Sam Beckham Committed by Mike Greiling

Adds the page for instance lvl security dashboard

- Adds the route
- Adds the template
- Puts the above behind a feature flag
parent 3b78614f
......@@ -107,6 +107,7 @@ Rails.application.routes.draw do
draw :instance_statistics
Gitlab.ee do
draw :security
draw :smartcard
draw :jira_connect
draw :username
......
import Vue from 'vue';
import createStore from 'ee/security_dashboard/store';
import router from 'ee/security_dashboard/store/router';
import DashboardComponent from 'ee/security_dashboard/components/app.vue';
if (gon.features && gon.features.securityDashboard) {
document.addEventListener(
'DOMContentLoaded',
() =>
new Vue({
el: '#js-security',
store: createStore(),
router,
components: {
DashboardComponent,
},
render(createElement) {
return createElement(DashboardComponent, {
props: {},
});
},
}),
);
}
# frozen_string_literal: true
class SecurityController < ApplicationController
before_action :authorize_read_security_dashboard!
before_action do
push_frontend_feature_flag(:security_dashboard)
end
def authorize_read_security_dashboard!
render_404 unless Feature.enabled?(:security_dashboard) &&
can?(current_user, :read_security_dashboard)
end
end
- page_title _('Security Dashboard')
- @hide_breadcrumbs = true
#js-security
# frozen_string_literal: true
get 'security' => 'security#index'
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