Skip to content

Commit

Permalink
tabname in context
Browse files Browse the repository at this point in the history
  • Loading branch information
Sacha Trauwaen committed May 15, 2023
1 parent d3be3e3 commit 8881b2d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion OpenContent/Components/DnnEntitiesAPIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,9 @@ public HttpResponseMessage UserRoleLookup(string q)
{
var roles = DotNetNuke.Security.Roles.RoleController.Instance.GetRoles(PortalSettings.PortalId).AsQueryable();

roles = roles.Where(r => r.RoleName != "Administrators" && r.RoleName != "Registered Users");
roles = roles.Where(r => r.RoleName != "Administrators"
&& r.RoleName != "Registered Users"
&& r.RoleName != "Unverified Users");
if (q != "*" && !string.IsNullOrEmpty(q))
{
roles = roles.Where(t => t.RoleName.ToLower().Contains(q.ToLower()));
Expand Down
2 changes: 2 additions & 0 deletions OpenContent/Components/Manifest/OpenContentModuleConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ internal string EditUrl(int moduleId)
public bool PreviewEnabled => _portalSettings != null && (_portalSettings.UserMode == PortalSettings.Mode.View);

public string PortalName => _portalSettings.PortalName;

public string TabName => _portalSettings.ActiveTab.TabName;
#endregion
}

Expand Down
1 change: 1 addition & 0 deletions OpenContent/Components/Render/ModelFactoryBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ protected void ExtendModel(JObject model, bool onlyData, bool onlyMainData, stri
context["ModuleId"] = _module.ViewModule.ModuleId;
context["GoogleApiKey"] = App.Services.CreateGlobalSettingsRepository(_portalId).GetGoogleApiKey();
context["ModuleTitle"] = _module.ViewModule.ModuleTitle;
context["TabName"] = _module.TabName;

context["IsEditMode"] = IsEditMode;
context["PortalId"] = _portalId;
Expand Down
2 changes: 1 addition & 1 deletion OpenContent/OpenContent.dnn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<dotnetnuke type="Package" version="5.0">
<packages>
<package name="OpenContent" type="Module" version="05.00.05">
<package name="OpenContent" type="Module" version="05.00.06">
<friendlyName>OpenContent</friendlyName>
<description>OpenContent module by Satrabel.be</description>
<iconFile>~/DesktopModules/OpenContent/Images/icon_extensions.png</iconFile>
Expand Down

0 comments on commit 8881b2d

Please sign in to comment.