mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
API CHANGE Security::permissionFailure(); will no longer tell the client side JS to show the login box if the user is already logged in
ENHANCEMENT added canAddTopLevel permission to SiteConfig to determine which users/groups can add pages to the root of the sitetree. (from r87279) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@98159 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
7a1e8591c8
commit
ecbd5f89c0
@ -128,21 +128,19 @@ addpageclass.prototype = {
|
|||||||
|
|
||||||
if( !_NEW_PAGES[parentID] )
|
if( !_NEW_PAGES[parentID] )
|
||||||
_NEW_PAGES[parentID] = 1;
|
_NEW_PAGES[parentID] = 1;
|
||||||
|
|
||||||
var suffix = _NEW_PAGES[parentID]++;
|
var suffix = _NEW_PAGES[parentID]++;
|
||||||
Ajax.SubmitForm(_HANDLER_FORMS.addpage, "action_addpage", {
|
Ajax.SubmitForm(_HANDLER_FORMS.addpage, "action_addpage", {
|
||||||
onSuccess : Ajax.Evaluator,
|
onSuccess : Ajax.Evaluator,
|
||||||
onFailure : this.showAddPageError,
|
onFailure : function(response) { if (response.status == 403) {
|
||||||
|
alert('You cannot add that page at that location.');
|
||||||
|
}},
|
||||||
extraData: '&Suffix=' + suffix
|
extraData: '&Suffix=' + suffix
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
showAddPageError: function(response) {
|
|
||||||
errorMessage(ss.i18n._t('CMSMAIN.ERRORADDINGPAGE'), response);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user