View Persmission does not work

Aug 16, 2012 at 12:46 PM

Hi,

I tried the solution and I was lucky when I saw that "column permission" did its work.

But the other part "view permission" is not working. I can't hide a view, so that a specified user won't be able to see it.

I use a "German SharePoint-Installation" (not English with language-pack), so could that be the problem?

Nevertheless thanks for this solution!

Coordinator
Aug 16, 2012 at 1:52 PM

Hello.
Hard to say what can be a problem because I used for testing English version of SharePoint. Please can you send me more details about the problem. You have specified the permission settings for views. You have saved this settings and tested this for standard sharepoint user but your user still can access the view and also see this view in context menu?.... Please let me know. Thank you

Aug 17, 2012 at 9:03 AM

Well, I did the following:

I took a standard document library and I created a new column for testing the column permission. All the functionalities with column permissions are good.

Then I created a new view on this library which is called "Test". My "test-user" sees the view "Test", although he is named in the field for denying the access to it. He also sees the view in the context menu and even in a placed webpart.

For both functions I use the same useraccount.

Coordinator
Aug 17, 2012 at 7:49 PM

Hello.
I have found the problem. In next 24 hours I will make new version where this problem is corrected. Thank you for bug report.

Coordinator
Aug 17, 2012 at 10:08 PM

Hello.
Please download new version of this solution and reinstall it. Right now should everything work also in Document Libraries.
Thank you

Aug 20, 2012 at 9:43 AM

Hello,

thanks for your fast revision.

I downloaded your update and installed it via powershell with update-spsolution. Now it work nearly 100%. What I mean is, that the context menu just shows the view for which the permission was denied. But if I call the url of the view, the user gets the sharepoint-page with permission denied.

So there are only the context menu in the breadcrumb navigation and the dropdown list in the library tools which show the view.

Best regards...

 

Coordinator
Aug 20, 2012 at 12:33 PM

Hello.
Hmm...Again hard to say....Please try to completely uninstall this feature from your sharepoint. After that Install it again and reset IIS and try to reset also owstimer.exe. I have tested the context menu and for me views are hidden...

PS: Do you have some other features like this feature installed on your SharePoint?

Thanks

Coordinator
Aug 20, 2012 at 8:49 PM

Hello. Please let me know which version of SharePoint do you use. SharePoint Standard or Enterprise. Because I have again tested this on another SharePoint and everything was working. Thank you

Aug 21, 2012 at 8:46 AM

Hello,

I'm testing your solution actually on a local machine. It's a notebook with Windows 7 Professional and an installation of Sharepoint 2010 Enterprise which version is 14.0.4762.1000. So it has no servicepack or any cu installed. OS and Sharepoint are German installations.

On this machine there are many other deployments of own solutions, and there are also some from codeplex. My own solutions have no functions relating to permissions. And the solutions from codeplex are these: http://sp2010adgroupmembers.codeplex.com/ ; http://permissionsmanager.codeplex.com/

A few minutes ago I did the following: uninstall the solution, iisreset, install the solution (for one webapplication), iisreset.

Result: The same situation as I reported yesterday.

I hope this helps you.

 

Coordinator
Aug 21, 2012 at 9:46 AM
Edited Aug 21, 2012 at 10:35 AM

Hello. Thank you very much. I will test this also on SharePoint Enterprise but before this...my last question is are you installing this solution as a Administrator of Server?Not only SharePoint Administrator but administrator of Server? Thank you

Aug 22, 2012 at 5:33 PM

My Notebook is a member of a Domain, and my user account ist domain-admin and also "farm-admin" on my local Sharepoint-Installation.

Hope this will help you.

Best regards...

 

Coordinator
Aug 23, 2012 at 9:15 PM

Hello. Thank you for information I have one question...Please are you able to go to

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE   (or where is your SharePoint installed)

and there is file vsmenu.aspx.... Please open this file in some textpad (Don't change anything) and try to find this:

<SPGuysCustomFieldPermissionLibrary:CustomViewSelectorMenu

If you don't have this text in your file I think that I am able to solve this problem... But if you have this text in your file....I am not sure what can be a problem...
Please if you can check this on your sharepoint.

Thank you

Aug 24, 2012 at 9:30 AM
Edited Aug 24, 2012 at 9:30 AM

Hello,

I found the line. The file "vsmenu.aspx" is in "...\14\Template\Layouts". And the line is:

<SPGuysCustomFieldPermissionLibrary:CustomViewSelectorMenu runat="server" id="idVSMenu" />

In the same directory there is also a file "vsmenu_backup.aspx". Good luck for solving the problem!

 

Coordinator
Aug 26, 2012 at 5:35 PM

Hello. Thank you. I will look on it and try find problem because I have tested this right now on 5 enviroments and there was no problem with this...Hmm...I try to do my best. Thanks for bug.

Coordinator
Aug 31, 2012 at 4:37 PM

Hello.
Please try to uninstall my solution and download new one. I have created new system for overriding the vsmenu.aspx. For me this is again working without any problem. Thank you

Sep 4, 2012 at 12:55 PM

Hello,

and sorry for my late response.

But I have a nasty trouble with my Sharepoint-Dev-Machine which I have to solve first. I will test your update as soon as possible.

Thanks for patience.

Sep 5, 2012 at 11:23 AM
Edited Sep 5, 2012 at 11:28 AM

Hello,

the time has come, that I could test your updated solution. But now there is another malfunction. Every user cannot change a view by a context menu! I created a second view to the existing "AllItems". And no user can use the context menu to switch between them, even the Farm-Admin.

Sorry for this report.

By the way: the last two days I updated my local Sharepoint to Patchlevel 14.6117.5000 (CU Feb. 2012).

Coordinator
Sep 5, 2012 at 11:44 AM
Hello. There must be something that block redirect module on your environment. Hard to say but after you click on context menu please go to event viewer and try to find if there is some error. I have created redirect module so when you click on connect menu with views you must be redirected to SPGUYS_menu.aspx and not to vsmenu.aspx.... Today I will look again on it. If you have still problem with this please deactivate this plugin and after that retract this solution and everything should work like before.
From: [email removed]
Sent: Wednesday, September 05, 2012 1:23 PM
To: [email removed]
Subject: Re: View Persmission does not work [SPColumnPermission:391872]

From: mfederer

Hello,

the time has come, that I could test your updated solution. But now there is another malfunction. Every user cannot change a view by a context menu! I created a second view to the existing "AllItems". And no user can use the context menu to switch between them, even the Farm-Admin.

Sorry for this response.

Sep 6, 2012 at 7:25 AM
Edited Sep 6, 2012 at 7:44 AM

Good morning,

I followed your advice and there is actually a warning in the eventlog! Here is the eventlog item (it's mostly in german language because of my german environment!):

Protokollname: ApplicationQuelle:        ASP.NET 2.0.50727.0Datum:         06.09.2012 09:17:36Ereignis-ID:   1309Aufgabenkategorie:(3)Ebene:         WarnungSchlüsselwörter:KlassischBenutzer:      Nicht zutreffendComputer:      xxxxxxxxBeschreibung:Event code: 3005 Event message: Es ist eine unbehandelte Ausnahme aufgetreten. Event time: 06.09.2012 09:17:36 Event time (UTC): 06.09.2012 07:17:36 Event ID: d1dbb47f43814e9197b69378d18f9828 Event sequence: 124 Event occurrence: 1 Event detail code: 0  Application information:     Application domain: /LM/W3SVC/1712163845/ROOT-2-129913894198281031     Trust level: Full     Application Virtual Path: /     Application Path: C:\inetpub\wwwroot\wss\VirtualDirectories\80\     Machine name: xxxxxxxx  Process information:     Process ID: 8588     Process name: w3wp.exe     Account name: xxxxxxxx\MSS-ADMIN  Exception information:     Exception type: SPException     Exception message: Liste nicht vorhanden.
Die gewählte Seite verweist auf eine nicht vorhandene Liste. Möglicherweise wurde sie von einem anderen Benutzer gelöscht.  Request information:     Request URL: http://xxxxxxxx/_layouts/SPGuys_menu.aspx?List=1Bd4b71773Es ist eine unbehandelte Ausnahme aufgetreten.D6f13Es ist eine unbehandelte Ausnahme aufgetreten.D4c57Es ist eine unbehandelte Ausnahme aufgetreten.Dbdc4Es ist eine unbehandelte Ausnahme aufgetreten.D0785621d39011D&View=1B0e773c30Es ist eine unbehandelte Ausnahme aufgetreten.D8905Es ist eine unbehandelte Ausnahme aufgetreten.D4b41Es ist eine unbehandelte Ausnahme aufgetreten.D8b3bEs ist eine unbehandelte Ausnahme aufgetreten.Da973e9d6d6121D&Source=http06.09.2012 09:17:36AEs ist eine unbehandelte Ausnahme aufgetreten.FEs ist eine unbehandelte Ausnahme aufgetreten.FfederermEs ist eine unbehandelte Ausnahme aufgetreten.DezEs ist eine unbehandelte Ausnahme aufgetreten.FOrganisationEs ist eine unbehandelte Ausnahme aufgetreten.FMusterEs ist eine unbehandelte Ausnahme aufgetreten.FDocumentsEs ist eine unbehandelte Ausnahme aufgetreten.FFormsEs ist eine unbehandelte Ausnahme aufgetreten.FAllItemsEs ist eine unbehandelte Ausnahme aufgetreten.Easpx&     Request path: /_layouts/SPGuys_menu.aspx     User host address: fe80::b043:fd0e:7f25:53f4http://federerm-ez/_layouts/SPGuys_menu.aspx?List=1Bd4b71773Es ist eine unbehandelte Ausnahme aufgetreten.D6f13Es ist eine unbehandelte Ausnahme aufgetreten.D4c57Es ist eine unbehandelte Ausnahme aufgetreten.Dbdc4Es ist eine unbehandelte Ausnahme aufgetreten.D0785621d39011D&View=1B0e773c30Es ist eine unbehandelte Ausnahme aufgetreten.D8905Es ist eine unbehandelte Ausnahme aufgetreten.D4b41Es ist eine unbehandelte Ausnahme aufgetreten.D8b3bEs ist eine unbehandelte Ausnahme aufgetreten.Da973e9d6d6121D&Source=http06.09.2012 09:17:36AEs ist eine unbehandelte Ausnahme aufgetreten.FEs ist eine unbehandelte Ausnahme aufgetreten.FfederermEs ist eine unbehandelte Ausnahme aufgetreten.DezEs ist eine unbehandelte Ausnahme aufgetreten.FOrganisationEs ist eine unbehandelte Ausnahme aufgetreten.FMusterEs ist eine unbehandelte Ausnahme aufgetreten.FDocumentsEs ist eine unbehandelte Ausnahme aufgetreten.FFormsEs ist eine unbehandelte Ausnahme aufgetreten.FAllItemsEs ist eine unbehandelte Ausnahme aufgetreten.Easpx&     User: EZ-ONLINE\federerm     Is authenticated: True     Authentication Type: NTLM     Thread account name: xxxxxxxx\MSS-ADMIN  Thread information:     Thread ID: 10     Thread account name: xxxxxxxx\MSS-ADMIN     Is impersonating: False     Stack trace:    bei Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)   bei Microsoft.SharePoint.Library.SPRequest.GetListsWithCallback(String bstrUrl, Guid foreignWebId, String bstrListInternalName, Int32 dwBaseType, Int32 dwBaseTypeAlt, Int32 dwServerTemplate, UInt32 dwGetListFlags, UInt32 dwListFilterFlags, Boolean bPrefetchMetaData, Boolean bSecurityTrimmed, Boolean bGetSecurityData, Boolean bPrefetchRelatedFields, ISP2DSafeArrayWriter p2DWriter, Int32& plRecycleBinCount)   bei Microsoft.SharePoint.SPListCollection.EnsureListsData(Guid webId, String strListName)   bei Microsoft.SharePoint.SPListCollection.ItemByInternalName(String strInternalName, Boolean bThrowException)   bei Microsoft.SharePoint.SPListCollection.GetListById(Guid uniqueID, Boolean bThrowException)   bei Microsoft.SharePoint.ApplicationPages.ViewSelectorMenuPage.get_List()   bei Microsoft.SharePoint.ApplicationPages.ViewSelectorMenuPage.OnInitComplete(EventArgs e)   bei System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)  Custom event details: 
Ereignis-XML:<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">  <System>    <Provider Name="ASP.NET 2.0.50727.0" />    <EventID Qualifiers="32768">1309</EventID>    <Level>3</Level>    <Task>3</Task>    <Keywords>0x80000000000000</Keywords>    <TimeCreated SystemTime="2012-09-06T07:17:36.000000000Z" />    <EventRecordID>553288</EventRecordID>    <Channel>Application</Channel>    <Computer>xxxxxxxx</Computer>    <Security />  </System>  <EventData>    <Data>3005</Data>    <Data>Es ist eine unbehandelte Ausnahme aufgetreten.</Data>    <Data>06.09.2012 09:17:36</Data>    <Data>06.09.2012 07:17:36</Data>    <Data>d1dbb47f43814e9197b69378d18f9828</Data>    <Data>124</Data>    <Data>1</Data>    <Data>0</Data>    <Data>/LM/W3SVC/1712163845/ROOT-2-129913894198281031</Data>    <Data>Full</Data>    <Data>/</Data>    <Data>C:\inetpub\wwwroot\wss\VirtualDirectories\80\</Data>    <Data>xxxxxxxx</Data>    <Data>    </Data>    <Data>8588</Data>    <Data>w3wp.exe</Data>    <Data>xxxxxxxx\MSS-ADMIN</Data>    <Data>SPException</Data>    <Data>Liste nicht vorhanden.
Die gewählte Seite verweist auf eine nicht vorhandene Liste. Möglicherweise wurde sie von einem anderen Benutzer gelöscht.</Data>    <Data>http://xxxxxxxx/_layouts/SPGuys_menu.aspx?List=%7Bd4b71773%2D6f13%2D4c57%2Dbdc4%2D0785621d3901%7D&amp;View=%7B0e773c30%2D8905%2D4b41%2D8b3b%2Da973e9d6d612%7D&amp;Source=http%3A%2F%2Ffedererm%2Dez%2FOrganisation%2FMuster%2FDocuments%2FForms%2FAllItems%2Easpx&amp;</Data>    <Data>/_layouts/SPGuys_menu.aspx</Data>    <Data>fe80::b043:fd0e:7f25:53f4%20</Data>    <Data>xxxxxxxx</Data>    <Data>True</Data>    <Data>NTLM</Data>    <Data>xxxxxxxx\MSS-ADMIN</Data>    <Data>10</Data>    <Data>xxxxxxxx\MSS-ADMIN</Data>    <Data>False</Data>    <Data>   bei Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)   bei Microsoft.SharePoint.Library.SPRequest.GetListsWithCallback(String bstrUrl, Guid foreignWebId, String bstrListInternalName, Int32 dwBaseType, Int32 dwBaseTypeAlt, Int32 dwServerTemplate, UInt32 dwGetListFlags, UInt32 dwListFilterFlags, Boolean bPrefetchMetaData, Boolean bSecurityTrimmed, Boolean bGetSecurityData, Boolean bPrefetchRelatedFields, ISP2DSafeArrayWriter p2DWriter, Int32&amp; plRecycleBinCount)   bei Microsoft.SharePoint.SPListCollection.EnsureListsData(Guid webId, String strListName)   bei Microsoft.SharePoint.SPListCollection.ItemByInternalName(String strInternalName, Boolean bThrowException)   bei Microsoft.SharePoint.SPListCollection.GetListById(Guid uniqueID, Boolean bThrowException)   bei Microsoft.SharePoint.ApplicationPages.ViewSelectorMenuPage.get_List()   bei Microsoft.SharePoint.ApplicationPages.ViewSelectorMenuPage.OnInitComplete(EventArgs e)   bei System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)</Data>  </EventData></Event>

I hope this will help you. Best regards...

Sep 6, 2012 at 9:57 AM

i've noticed strange thing in my case - columns is working well, but for views, even after update, i apply user for one view, but get restriction for another view. what can be the root of this problem?

Coordinator
Sep 6, 2012 at 9:13 PM

Hello.
mfederer: Thank you for report I found the problem in httpmodule and I will rewrite it and I also found that the problem with views is that your sharepoint doesn't call one override method AddMenuItems....RIght now I don't know why is this....I will look on it.
DrTod: In next version this problem will be solved.

Sep 7, 2012 at 2:05 PM

thanks a lot for your smart support of this really useful feature.

Coordinator
Sep 8, 2012 at 7:24 PM

Hello. I have created new version where is removed method AddMenuItems and everything is in OnInit method. Again for me this is working so please:
1. Uninstall old version of this feature
2. Restart IIS
3. Install and Activate new version 1.3
4. Restart IIS and WebBrowser
5. Test it.

If this version still not work correctly I don't know what can be a problem and I am unable to resolve this problem without debuging. I have tested this feature on 5 enviroments for now and everything was working.

PS: Please what type of Site Collection do you use on your Web Application?

Sep 9, 2012 at 10:13 AM

Hello,

thank you for the next verson, which I tested immediately.

Since your version 1.2 I'm downloading also the source code an deploy the solution by Visual Studio. I retracted the v1.2 and the I updated the VS-Project. After that I deployed v1.3.

The result is, that my last reported error (no choice from context menu for all users) is away. All users can choose views from context-menus. But the early problem is back. A restricted user can choose a permitted view from the context menu. If this user takes the direct url in the browser, Sharepoint says "Access denied".

I'm sorry for reporting again this error. And I'm also sorry, that from tomorrow on I can't test for the next two weeks because I will be on hollidays.

Sep 17, 2012 at 2:20 PM

it's a miracle ;))) thank you.

Coordinator
Sep 22, 2012 at 9:50 AM

Hello.
I found the problem with views. If you have activated on your site collection Metadata Navigation and Filtering the context menu still displays all views. I am not sure why SharePoint not hit my CustomViewSelectorMenu. Hmm...Very hard to say what can be a problem because my custom aspx page is hit but customviewselector menu not....Hmm... Thanks for any help.

Sep 25, 2012 at 5:40 AM

Hi,

I'm back and I tested whether the feature "Metadata ...." is activated and takes control to the context menu in my sharepoint. The result is, that the feature is activated and if I deactivate it, no context menu will appear! This effect is for all users, even for those who are not permitted.

I would like to test your version 1.4, but I wonder why there is no download for the source. Is it possible to provide the source further on?

Thanks!

Coordinator
Sep 25, 2012 at 12:43 PM
Normal 0 21 false false false SK X-NONE X-NONE MicrosoftInternetExplorer4

Hello. I will add source today. Only version 1.4 work with metadata. I will let you know. Thank you



On 24 Sep 2012 22:40:43 -0700
"mfederer" wrote:
>From: mfederer
>
> Hi, I'm back and I tested whether the feature "Metadata ...." is
>activated and takes control to the context menu in my sharepoint. The
>result is, that the feature is activated and if I deactivate it, no
>context menu will appear! This effect is for all users, even for
>those who are not permitted. I would like to test your version 1.4,
>but I wonder why there is no download for the source. Is it possible
>to provide the source further on? Thanks!
>
>
Coordinator
Oct 2, 2012 at 5:12 AM

Hello. New version 1.5 available also with soruce. This new version solve the problem with hidding fields in Views with group by formula. Thank you

Oct 4, 2012 at 12:19 PM

Hello,

I installed the new version (1.5) on my local Sharepoint. The result is the same as I reported for the last versions.

The user which should not see a special view gets an error, when this view is called directly (e.g. /Documents/Test.aspx). But the view can be selected by the context menus. Even if I select the restricted view in a webpart and the page is published, the user who should not see the view can see it.

I also retracted the solution, then made an iisreset and deployed it again. But this takes no effect.

The next step for me will be, that I'm installing your solution on an other Sharepoint, because I suspect that something is not ok whith my local environment. I will report again when this test is done.

 

Coordinator
Oct 4, 2012 at 1:00 PM
Hello. The problem is that if you have activated on your site collection Metadata Navigation and Filtering the context menu will still display the views. Try to disable this and it will work. I am lokking for the problem. Thank you
From: [email removed]
Sent: Thursday, October 04, 2012 2:20 PM
To: [email removed]
Subject: Re: View Persmission does not work [SPColumnPermission:391872]

From: mfederer

Hello,

I installed the new version (1.5) on my local Sharepoint. The result is the same as I reported for the last versions.

The user which should not see a special view gets an error, when this view is called directly (e.g. /Documents/Test.aspx). But the view can be selected by the context menus. Even if I select the restricted view in a webpart and the page is published, the user who should not see the view can see it.

I also retracted the solution, then made an iisreset and deployed it again. But this takes no effect.

The next step for me will be, that I'm installing your solution on an other Sharepoint, because I suspect that something is not ok whith my local environment. I will report again when this test is done.

Oct 11, 2012 at 11:28 AM

Hello,

your are right with the feature. If I deactivate it, the permitted view does not appear.

But I hope there will be a solution which works without that workaround.

Thanks.