Removing AllowsCultureVariation from ContentController, so we can get rid of OverrideAuthorization attribute
This commit is contained in:
@@ -42,16 +42,7 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
|
||||
return {
|
||||
|
||||
allowsCultureVariation: function () {
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.get(
|
||||
umbRequestHelper.getApiUrl(
|
||||
"contentApiBaseUrl",
|
||||
"AllowsCultureVariation")),
|
||||
'Failed to retrieve variant content types');
|
||||
},
|
||||
|
||||
savePermissions: function (saveModel) {
|
||||
savePermissions: function (saveModel) {
|
||||
if (!saveModel) {
|
||||
throw "saveModel cannot be null";
|
||||
}
|
||||
|
||||
@@ -361,6 +361,15 @@ function contentTypeResource($q, $http, umbRequestHelper, umbDataFormatter, loca
|
||||
"HasContentNodes",
|
||||
[{ id: id }])),
|
||||
'Failed to retrieve indication for whether content type with id ' + id + ' has associated content nodes');
|
||||
},
|
||||
|
||||
allowsCultureVariation: function () {
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.get(
|
||||
umbRequestHelper.getApiUrl(
|
||||
"contentTypeApiBaseUrl",
|
||||
"AllowsCultureVariation")),
|
||||
'Failed to retrieve variant content types');
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* @param {navigationService} navigationService A reference to the navigationService
|
||||
*/
|
||||
function NavigationController($scope, $rootScope, $location, $log, $q, $routeParams, $timeout, $cookies, treeService, appState, navigationService, keyboardService, historyService, eventsService, angularHelper, languageResource, contentResource, editorState) {
|
||||
function NavigationController($scope, $rootScope, $location, $log, $q, $routeParams, $timeout, $cookies, treeService, appState, navigationService, keyboardService, historyService, eventsService, angularHelper, languageResource, contentTypeResource, editorState) {
|
||||
|
||||
//this is used to trigger the tree to start loading once everything is ready
|
||||
var treeInitPromise = $q.defer();
|
||||
@@ -380,7 +380,7 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar
|
||||
*/
|
||||
function loadLanguages() {
|
||||
|
||||
return contentResource.allowsCultureVariation().then(function (b) {
|
||||
return contentTypeResource.allowsCultureVariation().then(function (b) {
|
||||
if (b === true) {
|
||||
return languageResource.getAll();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user