Show tabs iff a user is authenticated
This commit is contained in:
@@ -12,6 +12,8 @@ deferred class
|
||||
inherit
|
||||
CMS_API_ACCESS
|
||||
|
||||
CMS_REQUEST_UTIL
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make (a_type: like content_type)
|
||||
|
||||
@@ -265,6 +265,11 @@ feature -- Output
|
||||
node_api := a_response.node_api
|
||||
|
||||
a_response.add_variable (a_node, "node")
|
||||
|
||||
-- Show tabs only if a user is authenticated.
|
||||
if
|
||||
attached current_user (a_response.request) as l_user
|
||||
then
|
||||
lnk := a_response.node_local_link (a_node, a_response.translation ("View", Void))
|
||||
lnk.set_weight (1)
|
||||
a_response.add_to_primary_tabs (lnk)
|
||||
@@ -290,7 +295,7 @@ feature -- Output
|
||||
a_response.add_to_primary_tabs (lnk)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
create s.make_empty
|
||||
s.append ("<div class=%"info%"> ")
|
||||
if attached a_node.author as l_author then
|
||||
|
||||
Reference in New Issue
Block a user