我的意思是,我知道你可以:
>未经过身份验证时隐藏指向编辑器的链接.>未经过身份验证时拒绝编辑器的更新.
但是我希望用户被踢出编辑器,因为他/她有一个书签给编辑器但没有登录.
PS:有人可以为此创建一个水银编辑器标签吗?否则,搜索水银编辑器几乎是不可能的.
LIB /汞/ authentication.rb
module Mercury module Authentication def can_edit? true # check here to see if the user is logged in/has access end end end
你可以在那里运行你的支票代码.也许类似“if user_signed_in?&& current_user.admin?”