You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@casbin.apache.org by hs...@apache.org on 2026/04/12 15:41:06 UTC
(casbin-website) branch master updated: feat: replace externally hosted images with local assets (#461)
This is an automated email from the ASF dual-hosted git repository.
hsluoyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/casbin-website.git
The following commit(s) were added to refs/heads/master by this push:
new 517309a1 feat: replace externally hosted images with local assets (#461)
517309a1 is described below
commit 517309a134d5f3a84bacd50c0a5059a2b56a22fe
Author: cooronx <54...@users.noreply.github.com>
AuthorDate: Sun Apr 12 23:41:00 2026 +0800
feat: replace externally hosted images with local assets (#461)
---
blog/2020-04-21-google-award.md | 2 +-
...2-08-understanding-casbin-matching-in-detail.md | 2 +-
blog/authors.yml | 12 ++---
docs/AdminPortal.mdx | 4 +-
docs/Function.mdx | 52 ++++++++++-----------
docs/RBAC.mdx | 2 +
static/img/authors/BetaCat0.png | Bin 0 -> 67404 bytes
static/img/authors/aravindarc.png | Bin 0 -> 292759 bytes
static/img/authors/casbin.png | Bin 0 -> 22898 bytes
static/img/authors/hsluoyz.png | Bin 0 -> 257677 bytes
static/img/authors/nodece.png | Bin 0 -> 278640 bytes
static/img/authors/rushitote.png | Bin 0 -> 28104 bytes
static/img/blog/azure-scope-levels.png | Bin 0 -> 23526 bytes
.../google-open-source-peer-bonus-award-letter.png | Bin 0 -> 354503 bytes
static/img/docs/admin-portal-model-editor.png | Bin 0 -> 64952 bytes
static/img/docs/admin-portal-policy-editor.png | Bin 0 -> 72966 bytes
16 files changed, 38 insertions(+), 36 deletions(-)
diff --git a/blog/2020-04-21-google-award.md b/blog/2020-04-21-google-award.md
index df157f49..f273ed4d 100644
--- a/blog/2020-04-21-google-award.md
+++ b/blog/2020-04-21-google-award.md
@@ -7,7 +7,7 @@ We are pleased to announce that Casbin’s founder, [Yang Luo](https://github.co
<!-- truncate -->
-
+
> The full award letter is available [here](https://github.com/hsluoyz/hsluoyz.github.io/blob/master/download/Open%20Source%20Peer%20Bonus%20Q3%202019%20-%20Yang%20Luo%20-%20OSPB%20Award%20Letter.pdf).
diff --git a/blog/2023-12-08-understanding-casbin-matching-in-detail.md b/blog/2023-12-08-understanding-casbin-matching-in-detail.md
index c8ec6a4a..ff7b1cc7 100644
--- a/blog/2023-12-08-understanding-casbin-matching-in-detail.md
+++ b/blog/2023-12-08-understanding-casbin-matching-in-detail.md
@@ -13,7 +13,7 @@ RBAC restricts access based on the roles users hold. To see how **hierarchical**
## Azure’s hierarchical RBAC
-
+
In Azure, the **Owner** role applies at different scopes. If I have **Owner** at the subscription level, I am Owner of all resource groups and resources under that subscription. If I have Owner at a resource group level, I am Owner of all resources in that group.
diff --git a/blog/authors.yml b/blog/authors.yml
index 883987a0..23100d0e 100644
--- a/blog/authors.yml
+++ b/blog/authors.yml
@@ -2,33 +2,33 @@ hsluoyz:
name: Yang Luo
title: Creator of Casbin
url: https://github.com/hsluoyz
- image_url: https://avatars.githubusercontent.com/hsluoyz
+ image_url: /img/authors/hsluoyz.png
BetaCat0:
name: Helong Zhang
title: Casbin Maintainer
url: https://github.com/BetaCat0
- image_url: https://avatars.githubusercontent.com/BetaCat0
+ image_url: /img/authors/BetaCat0.png
nodece:
name: Zixuan Liu
title: Casbin Maintainer
url: https://github.com/nodece
- image_url: https://avatars.githubusercontent.com/nodece
+ image_url: /img/authors/nodece.png
rushitote:
name: Rushikesh Tote
title: Member of Casbin
url: https://github.com/rushitote
- image_url: https://avatars.githubusercontent.com/rushitote
+ image_url: /img/authors/rushitote.png
casbin:
name: Casbin
title: Official Account
url: https://github.com/casbin
- image_url: https://avatars.githubusercontent.com/casbin
+ image_url: /img/authors/casbin.png
aravindarc:
name: Aravinda Kumar
url: https://github.com/aravindarc
- image_url: https://avatars.githubusercontent.com/aravindarc
+ image_url: /img/authors/aravindarc.png
diff --git a/docs/AdminPortal.mdx b/docs/AdminPortal.mdx
index dc6c9f4f..c8b34023 100644
--- a/docs/AdminPortal.mdx
+++ b/docs/AdminPortal.mdx
@@ -8,9 +8,9 @@ authors: [hsluoyz]
**[Casdoor](https://casdoor.org)** is a web-based identity and access platform that can manage Casbin models and policies:
-
+
-
+
The table below lists **third-party admin and app projects** that use Casbin for authorization. They are useful as references or starters for your own service.
diff --git a/docs/Function.mdx b/docs/Function.mdx
index c302128a..66f702c2 100644
--- a/docs/Function.mdx
+++ b/docs/Function.mdx
@@ -55,40 +55,40 @@ Complete function details: [https://github.com/casbin/casbin/blob/master/util/bu
1. Implement a function that takes the required arguments and returns a `bool`:
-```go
-func KeyMatch(key1 string, key2 string) bool {
- i := strings.Index(key2, "*")
- if i == -1 {
- return key1 == key2
+ ```go
+ func KeyMatch(key1 string, key2 string) bool {
+ i := strings.Index(key2, "*")
+ if i == -1 {
+ return key1 == key2
+ }
+
+ if len(key1) > i {
+ return key1[:i] == key2[:i]
+ }
+ return key1 == key2[:i]
}
-
- if len(key1) > i {
- return key1[:i] == key2[:i]
- }
- return key1 == key2[:i]
-}
-```
+ ```
2. Wrap it for Casbin (signature `func(...interface{}) (interface{}, error)`):
-```go
-func KeyMatchFunc(args ...interface{}) (interface{}, error) {
- name1 := args[0].(string)
- name2 := args[1].(string)
+ ```go
+ func KeyMatchFunc(args ...interface{}) (interface{}, error) {
+ name1 := args[0].(string)
+ name2 := args[1].(string)
- return (bool)(KeyMatch(name1, name2)), nil
-}
-```
+ return (bool)(KeyMatch(name1, name2)), nil
+ }
+ ```
3. Register it on the enforcer:
-```go
-e.AddFunction("my_func", KeyMatchFunc)
-```
+ ```go
+ e.AddFunction("my_func", KeyMatchFunc)
+ ```
4. Use it in your model:
-```ini
-[matchers]
-m = r.sub == p.sub && my_func(r.obj, p.obj) && r.act == p.act
-```
+ ```ini
+ [matchers]
+ m = r.sub == p.sub && my_func(r.obj, p.obj) && r.act == p.act
+ ```
diff --git a/docs/RBAC.mdx b/docs/RBAC.mdx
index 2a49aff8..1eaa9c79 100644
--- a/docs/RBAC.mdx
+++ b/docs/RBAC.mdx
@@ -39,9 +39,11 @@ m = g(r.sub, p.sub) && r.obj == p.obj && r.act == p.act
So the request is allowed only if the request subject has the role given in the policy.
:::note
+
1. Casbin only stores and evaluates user–role (and resource–role) mappings; it does not validate that users or roles exist. That is the job of authentication.
2. Do not reuse the same name for a user and a role (e.g. user `alice` and role `alice`), since Casbin cannot tell them apart. Use a prefix (e.g. `role_alice`) if needed.
3. Role inheritance is transitive and unbounded: if A has role B and B has role C, then A effectively has role C.
+
:::
:::info Token name convention
diff --git a/static/img/authors/BetaCat0.png b/static/img/authors/BetaCat0.png
new file mode 100644
index 00000000..67873d64
Binary files /dev/null and b/static/img/authors/BetaCat0.png differ
diff --git a/static/img/authors/aravindarc.png b/static/img/authors/aravindarc.png
new file mode 100644
index 00000000..2503d689
Binary files /dev/null and b/static/img/authors/aravindarc.png differ
diff --git a/static/img/authors/casbin.png b/static/img/authors/casbin.png
new file mode 100644
index 00000000..bd47b823
Binary files /dev/null and b/static/img/authors/casbin.png differ
diff --git a/static/img/authors/hsluoyz.png b/static/img/authors/hsluoyz.png
new file mode 100644
index 00000000..bff823ed
Binary files /dev/null and b/static/img/authors/hsluoyz.png differ
diff --git a/static/img/authors/nodece.png b/static/img/authors/nodece.png
new file mode 100644
index 00000000..3a1eb789
Binary files /dev/null and b/static/img/authors/nodece.png differ
diff --git a/static/img/authors/rushitote.png b/static/img/authors/rushitote.png
new file mode 100644
index 00000000..d1772d9a
Binary files /dev/null and b/static/img/authors/rushitote.png differ
diff --git a/static/img/blog/azure-scope-levels.png b/static/img/blog/azure-scope-levels.png
new file mode 100644
index 00000000..65bbcd09
Binary files /dev/null and b/static/img/blog/azure-scope-levels.png differ
diff --git a/static/img/blog/google-open-source-peer-bonus-award-letter.png b/static/img/blog/google-open-source-peer-bonus-award-letter.png
new file mode 100644
index 00000000..270c50c5
Binary files /dev/null and b/static/img/blog/google-open-source-peer-bonus-award-letter.png differ
diff --git a/static/img/docs/admin-portal-model-editor.png b/static/img/docs/admin-portal-model-editor.png
new file mode 100644
index 00000000..2e36434c
Binary files /dev/null and b/static/img/docs/admin-portal-model-editor.png differ
diff --git a/static/img/docs/admin-portal-policy-editor.png b/static/img/docs/admin-portal-policy-editor.png
new file mode 100644
index 00000000..0fdf9012
Binary files /dev/null and b/static/img/docs/admin-portal-policy-editor.png differ
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@casbin.apache.org
For additional commands, e-mail: commits-help@casbin.apache.org