mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-17 17:53:50 +08:00
Add other authz rules.
This commit is contained in:
@ -48,7 +48,8 @@ e = some(where (p.eft == allow))
|
|||||||
[matchers]
|
[matchers]
|
||||||
m = (r.subOwner == p.subOwner || p.subOwner == "*") && (r.subName == p.subName || p.subName == "*") && \
|
m = (r.subOwner == p.subOwner || p.subOwner == "*") && (r.subName == p.subName || p.subName == "*") && \
|
||||||
(r.method == p.method || p.method == "*") && (r.urlPath == p.urlPath || p.urlPath == "*") && \
|
(r.method == p.method || p.method == "*") && (r.urlPath == p.urlPath || p.urlPath == "*") && \
|
||||||
(r.objOwner == p.objOwner || p.objOwner == "*") && (r.objName == p.objName || p.objName == "*")
|
(r.objOwner == p.objOwner || p.objOwner == "*") && (r.objName == p.objName || p.objName == "*") || \
|
||||||
|
(r.urlPath == "/api/update-user" && r.subOwner == r.objOwner && r.subName == r.objName)
|
||||||
`
|
`
|
||||||
|
|
||||||
m, err := model.NewModelFromString(modelText)
|
m, err := model.NewModelFromString(modelText)
|
||||||
@ -72,6 +73,7 @@ p, *, *, GET, /api/get-account, *, *
|
|||||||
p, *, *, GET, /api/auth/login, *, *
|
p, *, *, GET, /api/auth/login, *, *
|
||||||
p, *, *, GET, /api/get-application, *, *
|
p, *, *, GET, /api/get-application, *, *
|
||||||
p, *, *, GET, /api/get-users, *, *
|
p, *, *, GET, /api/get-users, *, *
|
||||||
|
p, *, *, GET, /api/get-user, *, *
|
||||||
`
|
`
|
||||||
|
|
||||||
sa := stringadapter.NewAdapter(ruleText)
|
sa := stringadapter.NewAdapter(ruleText)
|
||||||
|
@ -107,7 +107,7 @@ class UserEditPage extends React.Component {
|
|||||||
{i18next.t("general:Name")}:
|
{i18next.t("general:Name")}:
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={22} >
|
<Col span={22} >
|
||||||
<Input value={this.state.user.name} onChange={e => {
|
<Input value={this.state.user.name} disabled={true} onChange={e => {
|
||||||
this.updateUserField('name', e.target.value);
|
this.updateUserField('name', e.target.value);
|
||||||
}} />
|
}} />
|
||||||
</Col>
|
</Col>
|
||||||
|
Reference in New Issue
Block a user