Rhino Security: Problem with GetPermissionFor<TEntity>(TEntity entity)

1 view
Skip to first unread message

Magnus Haggren

unread,
Dec 15, 2009, 1:02:31 AM12/15/09
to Rhino Tools Dev
I have created an entity group and then associated an entity with this
group. I can see in the database that the correct entries are made.
I've got this in security_EntityReference:

Id
EntitySecurityKey Type
32FEFAF4-47D2-4D5A-98CF-9CDF017A3DB8
050F22D8-00CC-0000-0000-000000000000 C0C85032-1835-49BD-
BE19-9CDF017A3D1A

and this in security_EntityReferencesToEntititesGroup:

GroupId
EntityReferenceId
F4972267-73F8-4BB8-B3AF-9CDC0187100C
32FEFAF4-47D2-4D5A-98CF-9CDF017A3DB8

But when I call permissionService.GetPermissionFor<TEntity>(TEntity
entity) I don't get a match and it seems that it does have something
to do with case sensitivity when comparing GUIDs. Below is one sql
that is generated and it does not return any rows. If I instead change
@p0 to be all uppercase it does return one row.

SELECT this_.Id as Id76_0_,
this_.EntitySecurityKey as EntitySe2_76_0_,
this_.Allow as Allow76_0_,
this_.Level as Level76_0_,
this_.EntityTypeName as EntityTy5_76_0_,
this_.Operation as Operation76_0_,
this_.[User] as User7_17_0_,
this_.UsersGroup as UsersGroup76_0_,
this_.EntitiesGroup as Entities9_76_0_
FROM security_Permissions this_
WHERE (this_.EntitySecurityKey =
'05e022f8-00cc-0000-0000-000000000000' /* @p0 */
or 1 = 0)
ORDER BY this_.Level desc,
this_.Allow asc

I am running SQL Server 2008 for this.

Any help would be appriciated,

//Magnus Haggren

Ayende Rahien

unread,
Dec 16, 2009, 5:44:28 AM12/16/09
to rhino-t...@googlegroups.com
Guids aren't compared using string comparison, so it can't be it.
What happens when you try to look at the query results yourself?


--

You received this message because you are subscribed to the Google Groups "Rhino Tools Dev" group.
To post to this group, send email to rhino-t...@googlegroups.com.
To unsubscribe from this group, send email to rhino-tools-d...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rhino-tools-dev?hl=en.



Reply all
Reply to author
Forward
0 new messages