key: rule.id,
actives: true
};
+ if (this.app.organization) {
+ options.organization = this.app.organization;
+ }
return $.get(url, options).done(data => {
rule.set(data.rule);
rule.addExtraAttributes(that.app.repositories);
import WorkspaceHeaderView from './workspace-header-view';
import FacetsView from './facets-view';
import FiltersView from './filters-view';
+import { areThereCustomOrganizations } from '../../store/organizations/utils';
const App = new Marionette.Application();
isDefaultOrganization: boolean
}
) {
+ App.organization = options.organization;
const data = options.organization ? { organization: options.organization } : {};
$.get(window.baseUrl + '/api/rules/app', data)
.done(r => {
- App.customRules = options.organization == null || options.isDefaultOrganization;
+ App.customRules = !areThereCustomOrganizations();
App.canWrite = r.canWrite;
App.organization = options.organization;
App.qualityProfiles = sortBy(r.qualityprofiles, ['name', 'lang']);