mirror of
https://github.com/umami-software/umami.git
synced 2026-02-20 04:25:39 +01:00
Update permissions.
This commit is contained in:
parent
f1db3d0451
commit
dd2d9dc3f5
4 changed files with 5 additions and 6 deletions
|
|
@ -17,7 +17,7 @@ export default async (req, res) => {
|
|||
const { current_password, new_password } = req.body;
|
||||
const { id: accountUuid } = req.query;
|
||||
|
||||
if (!(await allowQuery(req, TYPE_ACCOUNT))) {
|
||||
if (!(await allowQuery(req, TYPE_ACCOUNT, false))) {
|
||||
return unauthorized(res);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,9 +9,8 @@ export default async (req, res) => {
|
|||
await useAuth(req, res);
|
||||
|
||||
const { id: websiteUuid } = req.query;
|
||||
const { userId } = req.auth;
|
||||
|
||||
if (!userId || !(await allowQuery(req, TYPE_WEBSITE))) {
|
||||
if (!(await allowQuery(req, TYPE_WEBSITE, false))) {
|
||||
return unauthorized(res);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export default async (req, res) => {
|
|||
const { id: websiteId } = req.query;
|
||||
|
||||
if (req.method === 'POST') {
|
||||
if (!(await allowQuery(req, TYPE_WEBSITE))) {
|
||||
if (!(await allowQuery(req, TYPE_WEBSITE, false))) {
|
||||
return unauthorized(res);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue