课程讨论区文件上传权限优化
This commit is contained in:
parent
0736dd1254
commit
6039cf63af
|
@ -818,6 +818,9 @@ class User < Principal
|
||||||
|
|
||||||
# authorize if user has at least one role that has this permission
|
# authorize if user has at least one role that has this permission
|
||||||
roles = memberships.collect {|m| m.roles}.flatten.uniq
|
roles = memberships.collect {|m| m.roles}.flatten.uniq
|
||||||
|
if roles.count == 0
|
||||||
|
roles = coursememberships.collect {|m| m.roles}.flatten.uniq
|
||||||
|
end
|
||||||
roles << (self.logged? ? Role.non_member : Role.anonymous)
|
roles << (self.logged? ? Role.non_member : Role.anonymous)
|
||||||
roles.any? {|role|
|
roles.any? {|role|
|
||||||
role.allowed_to?(action) &&
|
role.allowed_to?(action) &&
|
||||||
|
|
|
@ -691,6 +691,12 @@ ul.tool li{list-style-type:none;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul.user_course_sort{margin:0px; padding-left:0em;}
|
||||||
|
ul.user_course_sort li{list-style-type:none;
|
||||||
|
height:auto;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.info-break{
|
.info-break{
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
|
|
Loading…
Reference in New Issue