Change “access denied…” text string for document l

2019-07-23 15:39发布

I have a MOSS publishing site and a document library with it's own unique permissions.

On the site home page (default.aspx) I have a document library webpart that shows a list of documents. If the user does not have permissions to view the documents the web part currently displays the message

"Access denied. You do not have permission to perform this action or access this resource."

is there a way to change this message to something more friendly?

2条回答
【Aperson】
2楼-- · 2019-07-23 15:39

If inheriting doesn't work out, you could also use jQuery to look for the error message and replace it with something friendly.

There is info about setting up jQuery in SharePoint in this question.

查看更多
你好瞎i
3楼-- · 2019-07-23 15:42

I'm not sure I'd fuss with editing the existing .aspx files and go with custom error messages instead:

http://blogs.msdn.com/ketaanhs/archive/2009/03/16/moss-sharepoint-2007-custom-error-page-and-access-denied-page.aspx

Short version is that you use a custom httpmodule and make a couple of web.config changes to make sure the module is loaded and is called on error.

查看更多
登录 后发表回答