Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to: Hide the 'Protected Content' Rows in List Views

$
0
0

The complete description is available in the How to: Hide the 'Protected Content' Rows in List Views topic.

Question Comments

Added By: John A. Fuqua at: 7/28/2015 9:16:17 PM    

Does this filter/hide by role or user/owner?

Added By: Konstantin B (DevExpress) at: 7/29/2015 12:14:47 AM    As the permissions are not assigned to users directly, then technically, the filtering is role-based. When you are required to use the current user in filter criteria, use the CurrentUserIdfunction criteria operator.Added By: Royke Komala at: 9/27/2016 9:35:10 AM    I use the SecuredObjectSpaceProvider at WebApplication.cs as per your example
[C#]
protectedoverridevoidCreateDefaultObjectSpaceProvider(CreateCustomObjectSpaceProviderEventArgsargs){args.ObjectSpaceProvider=newSecuredObjectSpaceProvider((SecurityStrategy)Security,args.ConnectionString,args.Connection);}
and it correctly filter out the "protected content" rows (which are not created by the CurrentUserId).

BUT, problem occured at all other entities on 
[C#]
publicoverridevoidAfterConstruction(){base.AfterConstruction();XUser_user=Session.GetObjectByKey<XUser>(Session.GetKeyValue(SecuritySystem.CurrentUser));.....}
on above lines of code, _user is now always null, it cannot capture the current user object.
So, it will give error.

Before using SecuredObjectSpaceProvider, there's no problem getting current user object using Session.GetObjectByKey

How to resolve this?
(hopefully I explain it clear enough)

Thanks in advance for your support.


Added By: Dennis (DevExpress Support) at: 9/27/2016 9:39:12 AM    

@Royke: I've created a separate ticket on your behalf (T432689: Accessing protected data in code when using SecuredObjectSpaceProvider). It has been placed in our processing queue and will be answered shortly.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>