sections: upgrade_guide:root-user-checks-are-no-longer-necessary
This data as json
| id | page | ref | title | content | breadcrumbs | references |
|---|---|---|---|---|---|---|
| upgrade_guide:root-user-checks-are-no-longer-necessary | upgrade_guide | root-user-checks-are-no-longer-necessary | Root user checks are no longer necessary | Some plugins would introduce their own custom permission and then ensure the "root" actor had access to it using a pattern like this: @hookimpl def register_permissions(datasette): return [ Permission( name="upload-dbs", abbr=None, description="Upload SQLite database files", takes_database=False, takes_resource=False, default=False, ) ] @hookimpl def permission_allowed(actor, action): if action == "upload-dbs" and actor and actor.get("id") == "root": return True This is no longer necessary in Datasette 1.0a20 - the "root" actor automatically has all permissions when Datasette is started with the datasette --root option. The permission_allowed() hook in this example can be entirely removed. | ["Upgrade guide", "Datasette 1.0a20 plugin upgrade guide"] | [] |