Rename to AccessKontrol
This commit is contained in:
10
README.md
10
README.md
@@ -1,18 +1,18 @@
|
||||
# Access Kontrol
|
||||
Helpers to create a simple Access Control in kotlin
|
||||
|
||||
[](https://github.com/flecomte/access-control/actions/workflows/tests.yml)
|
||||
[](https://sonarcloud.io/dashboard?id=flecomte_access-control)
|
||||
[](https://github.com/flecomte/access-kontrol/actions/workflows/tests.yml)
|
||||
[](https://sonarcloud.io/dashboard?id=flecomte_access-kontrol)
|
||||
|
||||
[](https://sonarcloud.io/dashboard?id=flecomte_access-control)
|
||||
[](https://sonarcloud.io/dashboard?id=flecomte_access-control)
|
||||
[](https://sonarcloud.io/dashboard?id=flecomte_access-kontrol)
|
||||
[](https://sonarcloud.io/dashboard?id=flecomte_access-kontrol)
|
||||
|
||||
|
||||
## Example
|
||||
|
||||
Define AC
|
||||
```kotlin
|
||||
class AccessControlSample : AccessControl() {
|
||||
class AccessControlSample : AccessKontrol() {
|
||||
/** The user can view the object if it is connected and if it is the creator */
|
||||
fun canView(myObject: MyObject, user: User?): AccessResponse {
|
||||
return if (user != null && myObject.createdBy == user) {
|
||||
|
||||
Reference in New Issue
Block a user