Management Panel

2 views
Skip to first unread message

HAt

unread,
Feb 27, 2010, 7:58:28 AM2/27/10
to my_a...@googlegroups.com
سلام
من در هر جای سایت با هر یوزری که لاگ این می کنم باز وقتی به پنل مدیریتی می روم صفحه کامل لود می شود اما پنل خالی است و چیزی درون آن نیست
هم چنین در تابع
grantPermission()
آرگومان سوم که یوزر است باید چه مقداری به آن داد؟

Khosro Asgharifard

unread,
Feb 28, 2010, 12:09:06 AM2/28/10
to my_a...@googlegroups.com
Hi,
I have attached two SQL files ,one of them can be restore with MySQL Administrator and the other one can be restored with Navicat,Maybe these help you.
For your second question:
 for example for this authorization "  hasPermission(departement,'professor')" ,you must have this row in Permission table
------------------------------------------------
target               action       recipient                                                   discriminator
Department:1  professor  prof(this is username of registered user)      user
---------------------------------------------
Department:1 (1 is id of the current department in "department" table)

For inserting above row to table you  must write the following code
securityService.grantPermission(department,"professor",user)
user here is for example prof(either logged in user or you can get him from database) , that when you call grantPermission ,"prof" insert into recipient column and "user " insert in discriminator column.
 But there is some problem here ,that is ,you must have also this row in Permission table,otherwise you got Authorization exception,(if you log in with staff user and you want to grant above permission)
---------------------------------------------------------------
target               action                         recipient   discriminator
Department:1  seam.grant-permission  staff                user
----------------------------------------------------------------
This is a problem that i have asked here http://seamframework.org/Community/UsingPermissionManagerToGrant
At last,i think we must create our own PermissionManager class from Seam source and omit the line 102 of that class(But this is a guess).

Khosro.













Khosro.



From: HAt <ham...@gmail.com>
To: my_a...@googlegroups.com
Sent: Sat, February 27, 2010 4:58:28 AM
Subject: [my_autcms] Management Panel
--
You received this message because you are subscribed to the Google Groups "my_autcms" group.
To post to this group, send email to my_a...@googlegroups.com.
To unsubscribe from this group, send email to my_autcms+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/my_autcms?hl=en.

SQL Files.rar
Reply all
Reply to author
Forward
0 new messages