Preview:
package users
import future.keywords.in

default allow = false
allow {
    input.auth.privilege == "admin"
}

allow {
    input.scope == "list"
}

allow {
    input.scope in { "update", "delete", "view" }
    input.resource.id == input.auth.user.id
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter