Problem with setting up permit

1 view
Skip to first unread message

simon

unread,
May 19, 2009, 9:02:13 AM5/19/09
to Ruby on Rails: Goldberg
Problem:
I am working with goldberg 's permit.
I have a page just for teacher, example,
controller => teacher_profile, action => "infor"
and I have a page for student , example
controller => student_profile, action => "infor"

Role and Permit:
two role , "teacher" and "student"
"teacher" supposed to reach both teacher_profile/infor and
student_profile/infor
but "student" can only reach student_profile

Role relationship is demonstated below:
teacher 's based on student, student based on public role

Permit:
teacher 's permition is "teacher_can_read"
student 's permition is "student_can_read"

Action 's permit:
teacher_profile ( controller ) ----> teacher_can_read
student_profile ( controller ) ----> student_can_read

and menu's setup properly

Question:
when i login in with a id in role of student, there's no menu for
student...
but when i login in with "admin", it can show everything right!
how can i make it right to show student's menu properly?

simon

unread,
May 19, 2009, 11:20:19 AM5/19/09
to Ruby on Rails: Goldberg
sorry~i got stupid mistakes, but now everything 's fine~
Reply all
Reply to author
Forward
0 new messages