mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2026-04-26 16:15:54 +03:00
[PR #203] [MERGED] Make cloning admin-only, check zones returned by formzonelist #205
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
pull-request
question
question
upstream
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nsedit#205
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/tuxis-ie/nsedit/pull/203
Author: @WilliamDEdwards
Created: 4/17/2024
Status: ✅ Merged
Merged: 4/17/2024
Merged by: @tuxis-ie
Base:
master← Head:fix/make-clone-admin-only📝 Commits (1)
e8d028bMake cloning admin-only, check zones returned by formzonelist📊 Changes
2 files changed (+8 additions, -3 deletions)
View changed files
📝
index.php(+6 -3)📝
zones.php(+2 -0)📄 Description
Cloning was meant to be an admin-only functionality. However, this was not fully implemented: when
allowzoneadd = true, the user could clone zones, even when not an admin. This is not necessarily a problem. But in this case, it is. Because the endpoint that is used to get zones to clone (formzonelist), did not check whether those zones belong to the current user. In other words: whenallowzoneadd = trueand the user is not an admin, that user is able to see all zones under 'Clone a zone' button -> 'Source domain' dropdown.This commit fixes that, by letting
formzonelistreturn only zones belonging to the user, and showing the 'Clone a zone' button only when the user is an admin.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.