Cleaned auth module by removing useless code.

Added CMS_USER_API.user_role_by_name (a_name: READABLE_STRING_GENERAL): detachable CMS_USER_ROLE
Added enabled/disabled status in admin/install.
This commit is contained in:
2015-07-14 18:59:09 +02:00
parent d4fc9f9411
commit 2040a746dd
6 changed files with 123 additions and 77 deletions

View File

@@ -66,7 +66,13 @@ feature -- HTTP Methods
loop
l_module := ic.item
if api.is_module_installed (l_module) then
s.append ("<li>" + l_module.name + " is already installed.</li>%N")
s.append ("<li>")
s.append (l_module.name)
if l_module.is_enabled then
s.append (" </strong>[enabled]</strong>")
end
s.append (" is already installed.")
s.append ("</li>%N")
else
lst.force (l_module)
end
@@ -76,11 +82,19 @@ feature -- HTTP Methods
lst as ic
loop
l_module := ic.item
if api.is_module_installed (l_module) then
s.append ("<li>" + l_module.name + " was successfully installed.</li>%N")
else
s.append ("<li>" + l_module.name + " could not be installed!</li>%N")
s.append ("<li>")
s.append (l_module.name)
if l_module.is_enabled then
s.append (" </strong>[enabled]</strong>")
end
if api.is_module_installed (l_module) then
s.append (" was successfully installed.")
else
s.append (" could not be installed!")
s.append (" <span class=%"error%">[ERROR]</span>")
end
s.append ("</li>%N")
end
s.append ("</ul>")
r.set_main_content (s)

View File

@@ -123,6 +123,11 @@ feature -- User roles.
Result := storage.user_role_by_id (a_id)
end
user_role_by_name (a_name: READABLE_STRING_GENERAL): detachable CMS_USER_ROLE
do
Result := storage.user_role_by_name (a_name)
end
feature -- Change User
new_user (a_user: CMS_USER)