Hei My friends, following my stupid Idea!!!!
It work!!! And my client is happy, And He is allway an Admin user
Directory
DesktopModules\Admin\Extensions
Extensions.ascx.vb
row 530
replace
Actions.Add(ModuleContext.GetNextActionID, Services.Localization.Localization.GetString("ExtensionInstall.Action", LocalResourceFile), ModuleActionType.AddContent, "", "action_import.gif", Util.InstallURL(ModuleContext.TabId, ""), False, SecurityAccessLevel.Host, True, False)
with
'Actions.Add(ModuleContext.GetNextActionID, Services.Localization.Localization.GetString("ExtensionInstall.Action", LocalResourceFile), ModuleActionType.AddContent, "", "action_import.gif", Util.InstallURL(ModuleContext.TabId, ""), False, SecurityAccessLevel.Host, True, False)
Actions.Add(ModuleContext.GetNextActionID, Services.Localization.Localization.GetString("ExtensionInstall.Action", LocalResourceFile), ModuleActionType.AddContent, "", "action_import.gif", Util.InstallURL(ModuleContext.TabId, ""), False, SecurityAccessLevel.Admin, True, False)
Install.ascx.vb
CheckSecurity function
row 264
add
.......
End Select
End If
'========== allow Admin user install extension
if PortalSecurity.IsInRole("Administrators") then
allowAccess = true
End If
'============================================================
If Not allowAccess Then
Response.Redirect(NavigateURL("Access Denied"), True)
......
row 287
replace
If Not ModuleContext.PortalSettings.UserInfo.IsSuperUser Then
with
'If Not ModuleContext.PortalSettings.UserInfo.IsSuperUser Then
If (Not ModuleContext.PortalSettings.UserInfo.IsSuperUser) and (not PortalSecurity.IsInRole("Administrators")) Then
IT'S SO BRUTAL, i accept more then one suggestion!
If you want you can make only the Install.ascx modify and give to your client the link to the Install area! For example if you whant that only one admin can add extension!!!!!!
bye bye rmartin
|