Skip to content

Commit

Permalink
feat: enable showUmc for the portal and configure default modules
Browse files Browse the repository at this point in the history
  • Loading branch information
m0wer authored and Y0-L0 committed Oct 13, 2024
1 parent 8d2650e commit e8c80b4
Show file tree
Hide file tree
Showing 7 changed files with 291 additions and 3 deletions.
9 changes: 9 additions & 0 deletions helm/stack-data-ums/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,15 @@ null
</td>
<td></td>
</tr>
<tr>
<td>stackDataContext.showUmc</td>
<td>bool</td>
<td><pre lang="json">
true
</pre>
</td>
<td>Default portal show UMC modules</td>
</tr>
<tr>
<td>stackDataContext.smtpHost</td>
<td>string</td>
Expand Down
2 changes: 1 addition & 1 deletion helm/stack-data-ums/config/default-base.conf
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ umc:
disabled: "True"
portals:
all:
disabled: "True"
disabled: false
users:
self:
disabled: "true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,23 @@ properties:
hosts: []
objectFlag: []
operation:
- command: "udm/nav/*"
- command: "udm/get"
option: ""
- command: "udm/layout"
option: ""
- command: "udm/meta_info"
option: ""
- command: "udm/nav/container/query"
option: ""
- command: "udm/nav/object/query"
option: ""
- command: "udm/policies"
option: ""
- command: "udm/properties"
option: ""
- command: "udm/types"
option: ""
- command: "udm/values"
option: ""
---
action: create
Expand Down Expand Up @@ -138,6 +154,29 @@ properties:
action: create
module: settings/umc_operationset
position: "cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
properties:
name: "udm-new-portal"
description: "UDM - Portal"
flavor: "portals/all"
hosts: []
objectFlag: []
operation:
- command: "udm/*"
option: "objectType=portals/*"
- command: "udm/types"
option: ""
- command: "udm/get"
option: ""
- command: "udm/put"
option: ""
- command: "udm/properties"
option: ""
- command: "udm/values"
option: ""
---
action: create
module: settings/umc_operationset
position: "cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
properties:
name: "udm-syntax"
description: "UDM - Syntax"
Expand Down Expand Up @@ -193,13 +232,227 @@ properties:
- command: "udm/get"
option: ""

---
action: create
module: settings/umc_operationset
position: "cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
properties:
name: "udm-blocklists"
description: "UDM - Blocklists"
flavor: "blocklists/all"
hosts: []
objectFlag: []
operation:
- command: "udm/*"
option: "objectType=blocklists/*"
flavor: "blocklists/all"

---
action: create
module: settings/umc_operationset
position: "cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
properties:
name: "udm-contacts"
description: "UDM - Contacts"
flavor: "users/contact"
hosts: []
objectFlag: []
operation:
- command: "udm/reports/query"
option: ""
- command: "udm/meta_info"
option: ""
- command: "udm/containers"
option: ""
- command: "udm/types"
option: ""
- command: "udm/properties"
option: ""
- command: "udm/layout"
option: ""
- command: "udm/policies"
option: ""
- command: "udm/values"
option: ""
- command: "udm/query"
option: ""
- command: "udm/*"
option: "objectType=users/contact"
- command: "udm/*"
option: "!objectType"
- command: "udm/query"
option: "objectType=policies/*"
- command: "udm/layout"
option: "objectType=policies/*"
- command: "udm/properties"
option: "objectType=policies/*"
---
action: create
module: settings/umc_operationset
position: "cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
properties:
name: "udm-printers"
description: "UDM - Printers"
flavor: "shares/print"
hosts: []
objectFlag: []
operation:
- command: "udm/*"
option: "!objectType"
- command: "udm/*"
option: "objectType=shares/print*"
- command: "udm/query"
option: "objectType=policies/*"
- command: "udm/layout"
option: "objectType=policies/*"
- command: "udm/properties"
option: "objectType=policies/*"
---
action: create
module: settings/umc_operationset
position: "cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
properties:
name: "udm-dhcp"
description: "UDM - DHCP"
flavor: "dhcp/dhcp"
hosts: []
objectFlag: []
operation:
- command: "udm/query"
option: "objectType=policies/*"
- command: "udm/layout"
option: "objectType=policies/*"
- command: "udm/*"
option: "objectType=dhcp/*"
- command: "udm/properties"
option: "objectType=policies/*"
---
action: create
module: settings/umc_operationset
position: "cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
properties:
name: "udm-dns"
description: "UDM - DNS"
flavor: "dns/dns"
hosts: []
objectFlag: []
operation:
- command: "udm/query"
option: "objectType=policies/*"
- command: "udm/layout"
option: "objectType=policies/*"
- command: "udm/*"
option: "objectType=dns/*"
- command: "udm/properties"
option: "objectType=policies/*"
---
action: create
module: settings/umc_operationset
position: "cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
properties:
name: "udm-mail"
description: "UDM - Mail"
flavor: "mail/mail"
hosts: []
objectFlag: []
operation:
- command: "udm/query"
option: "objectType=policies/*"
- command: "udm/layout"
option: "objectType=policies/*"
- command: "udm/*"
option: "objectType=mail/*"
- command: "udm/properties"
option: "objectType=policies/*"
---
action: create
module: settings/umc_operationset
position: "cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
properties:
name: "udm-network"
description: "UDM - Network"
flavor: "networks/network"
hosts: []
objectFlag: []
operation:
- command: "udm/layout"
option: "objectType=policies/*"
- command: "udm/*"
option: "objectType=networks/network"
- command: "udm/properties"
option: "objectType=policies/*"
---
action: create
module: settings/umc_operationset
position: "cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
properties:
name: "udm-shares"
description: "UDM - Shares"
flavor: "shares/share"
hosts: []
objectFlag: []
operation:
- command: "udm/*"
option: "!objectType"
- command: "udm/query"
option: "objectType=policies/*"
- command: "udm/layout"
option: "objectType=policies/*"
- command: "udm/*"
option: "objectType=shares/share"
- command: "udm/properties"
option: "objectType=policies/*"

---

action: create
module: settings/umc_operationset
position: "cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
properties:
name: "udm-computers"
description: "UDM - Computers"
flavor: "computers/computer"
hosts: []
objectFlag: []
operation:
- command: "udm/query"
option: "objectType=policies/*"
- command: "udm/layout"
option: "objectType=policies/*"
- command: "udm/*"
option: "objectType=computers/*"
- command: "udm/query"
option: "objectType=groups/group"
- command: "udm/properties"
option: "objectType=policies/*"
- command: "udm/*"
option: "!objectType"
- command: "udm/properties"
option: "objectType=groups/group"
- command: "udm/values"
option: "objectType=groups/group"

---
action: ensure_list_contains
module: policies/umc
position: "cn=default-umc-all,cn=UMC,cn=policies,{{ include "stack-data-ums.ldapBaseDn" $ }}"
properties:
allow:
- "cn=udm-all,cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
- "cn=udm-contacts,cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
- "cn=udm-groups,cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
- "cn=udm-users,cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
- "cn=udm-computers,cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
- "cn=udm-printers,cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
- "cn=udm-blocklists,cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
- "cn=udm-dhcp,cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
- "cn=udm-dns,cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
- "cn=udm-navigation,cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
- "cn=udm-mail,cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
- "cn=udm-network,cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
- "cn=udm-policies,cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
- "cn=udm-shares,cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
- "cn=udm-portal,cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
- "cn=udm-new-portal,cn=operations,cn=UMC,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
---
action: create
module: policies/umc
Expand Down
14 changes: 14 additions & 0 deletions helm/stack-data-ums/data-files/default/39-domain-portal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-License-Identifier: AGPL-3.0-only
# SPDX-FileCopyrightText: 2023 Univention GmbH

{{ with .Values.stackDataContext }}

---
# Change showUmc in the domain portal
action: "modify"
module: "portals/portal"
position: "cn=domain,cn=portal,cn=portals,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
properties:
showUmc: {{ include "stack-data-ums.showUmc" $ }}

{{ end }}
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ properties:
categories:
- "cn=self-service-profile,cn=category,cn=portals,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"
- "cn=self-service-password,cn=category,cn=portals,cn=univention,{{ include "stack-data-ums.ldapBaseDn" $ }}"

---
action: "ensure_list_contains"
module: "portals/portal"
Expand Down
8 changes: 8 additions & 0 deletions helm/stack-data-ums/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -299,3 +299,11 @@ machine.secret
univention-organization.intranet
{{- end -}}
{{- end -}}

{{- define "stack-data-ums.showUmc" -}}
{{- if .Values.stackDataContext.showUmc -}}
{{- .Values.stackDataContext.showUmc -}}
{{- else -}}
false
{{- end -}}
{{- end -}}
3 changes: 3 additions & 0 deletions helm/stack-data-ums/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ stackDataContext:
# (default: `true`)
smtpStartTls: true

# -- Default portal show UMC modules
showUmc: true

# -- Container image configuration
image:
registry: ""
Expand Down

0 comments on commit e8c80b4

Please sign in to comment.