Is there any way I can prevent end users from accessing the site setting page,site contents page by directly entering/ typing in the browser. Except a custom SPGroup,site collection admin nobody should access the site settings, site contents.

there are chances that, those who are smart end users, they will directly type the /15/viewlsts.aspx url or /settings.aspx in he browser to see the contents. I need to avoid this situation, such that when the end user types the url , if he is not site collec.admin or from a particular SPGroup [ in my case , mycustomSPGroup] he should get access denied message.


Add a javascript file as a UserCustomAction scriptlink, that will execute on every page.. system pages also

You can check document.location.href and do whatever you want.

Instead of checking rights you can check for failure with javascript:

try {

 //do something only admins can do, like accessing a List only they have access to

} catch(e) {

 //user without those rights will cause a JavaScript error end up here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.