mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 04:49:41 -05:00
Admin Panel / Settings / Privacy and security / Allowed addresses is a list of IPv4 and IPv6 addresses and CIDR ranges. Empty, the default, is any address. When it is set, a site administrator at any other address reads as a member: every admin method, publication, allow rule and admin REST endpoint refuses them, the Admin Panel's tabs say why, and their boards keep working. Members are not affected. It is enforced where every admin check reads: the caller's user document, through Meteor.users.findOneAsync (Meteor.userAsync, ReactiveCache.getUser and the allow rules all end there). For the caller of the running DDP method, publication or HTTP request, their own document reads isAdmin false, and a query that asks about isAdmin answers as it would for a member. Signing in reads the stored flag, because OIDC and LDAP write it back. The address and range rules are the Cloud Panel's (models/lib/cloudAddresses.js), and the address is resolved with HTTP_FORWARDED_COUNT like every other guard. A list without the saver's own address is refused, in the page before saving and on the server, and a browser write of the field is denied. The server's ADMIN_PANEL_ALLOWED_IP_ADDRESSES wins over the list, and "any" lifts it: the way back in. It is listed on every platform. A refused admin action from another address is one row in Admin Panel / Problems (authz.admin-panel-address), once per call, without disabling the account. Translations of the three new strings into every locale were written directly; the rarer languages (for example Cherokee, Inuktitut, Tigre, Wolaytta, Nahuatl, Veps, Klingon) are low confidence. Thanks to xet7 !
26 lines
1.6 KiB
Plaintext
26 lines
1.6 KiB
Plaintext
//- Admin Panel / Settings / Privacy and security / Allowed addresses
|
|
(models/lib/adminPanelAddresses.js, server/adminPanelAddresses.js): from
|
|
any other address the Admin Panel and the admin REST API refuse, and a site
|
|
administrator there is a member like any other. The server refuses a list
|
|
without the saver's own address, and the page says so before it is sent.
|
|
template(name="adminPanelAllowedAddresses")
|
|
form.js-admin-panel-addresses.admin-panel-addresses
|
|
h2.admin-pane-group-title {{_ 'cloud-allowed-addresses'}}
|
|
p.description {{_ 'admin-panel-allowed-addresses-desc'}}
|
|
if fromEnvironment
|
|
p.warning.js-admin-panel-addresses-env {{_ 'admin-panel-allowed-addresses-env'}}
|
|
textarea.wekan-form-control.js-admin-panel-addresses-text(name="addresses" rows="5" maxlength="12000" placeholder="203.0.113.0/24 2001:db8::/32" aria-label="{{_ 'cloud-allowed-addresses'}}")= addressesText
|
|
p.quiet.js-admin-panel-your-address {{_ 'cloud-allowed-addresses-yours' address=yourAddress}}
|
|
if lockout
|
|
p.warning.js-admin-panel-addresses-lockout {{_ 'cloud-allowed-addresses-lockout' address=yourAddress}}
|
|
button.primary(type="submit") {{_ 'save'}}
|
|
span.js-admin-panel-addresses-status= status
|
|
|
|
//- Shown in the Admin Panel's tabs to a site administrator at an address the
|
|
list does not have: the panes are empty there, and this says why.
|
|
template(name="adminPanelAddressRefused")
|
|
if refused
|
|
span.admin-panel-address-refused.js-admin-panel-address-refused
|
|
i.fa.fa-shield
|
|
| {{_ 'admin-panel-address-refused' address=yourAddress}}
|