Rhino Security: Distinction between different types of operations

92 weergaven
Naar het eerste ongelezen bericht

Bart Reyserhove

ongelezen,
22 dec 2008, 02:20:4522-12-2008
aan rhino-t...@googlegroups.com
Hi all,

I'd like to make a distinction between different types of operations. I have operations that are really operations such as for example "Login" but I have also operations for field level access, for example "User/UserName". I would like to make a disctinction between those two. There is a "comment" field in the "Operations" table, but it does not seem right to (mis)use that.

Would you accept a patch that adds a "Type" field to the "Operations" table or do you have another suggestion?

Bart

Ayende Rahien

ongelezen,
22 dec 2008, 02:23:0922-12-2008
aan rhino-t...@googlegroups.com
What would you want that type to contain?

Bart Reyserhove

ongelezen,
22 dec 2008, 02:44:0522-12-2008
aan rhino-t...@googlegroups.com
An integer so that I can use an enumeration with the different types of Operations I need.

Ayende Rahien

ongelezen,
22 dec 2008, 02:51:4122-12-2008
aan rhino-t...@googlegroups.com
Hm, I get a queasy feeling in my stomach for that. Remind me of Win32
Why not?

public class BartOperation : Operation
{
      OperationType OperationIsStronglyTyped {get;set;}

Bart Reyserhove

ongelezen,
22 dec 2008, 02:56:5722-12-2008
aan rhino-t...@googlegroups.com
Good point! 
If I'm not mistaking I can do that without the need to change anything in the Rhino.Security code right?

Ayende Rahien

ongelezen,
22 dec 2008, 03:00:1022-12-2008
aan rhino-t...@googlegroups.com
You should be able to do that, yes.
The idea is that you are simply changing the mapping. I think that the easiest thing would be to do so statically, just by adding BartOp.hbm.xml and selectively getting the mapping for all the other entities.

That would be a great topic for a blog post, by the way

Bart Reyserhove

ongelezen,
22 dec 2008, 16:57:1922-12-2008
aan rhino-t...@googlegroups.com

Marco

ongelezen,
23 dec 2008, 05:35:2723-12-2008
aan Rhino Tools Dev
Nice solution!

Can you show / explain how you're using the field level security in
your application?

Thanks
Marco

On Dec 22, 10:57 pm, "Bart Reyserhove" <bart.reyserh...@gmail.com>
wrote:
> It works:http://bartreyserhove.blogspot.com/2008/12/using-nhibernate-mapping-o...

Bart Reyserhove

ongelezen,
23 dec 2008, 10:37:0523-12-2008
aan rhino-t...@googlegroups.com
I'm using ASP.NET MVC and we created some extensions methods for the HtmlHelper so that we have instead of Html.TextBox(...) an Html.SecuredTextBox. I am preparing a blog post on this topic. Should be ready pretty soon.

Bart
Allen beantwoorden
Auteur beantwoorden
Doorsturen
0 nieuwe berichten