{% extends "admin_base.html" %} {% block copyright %} {% endblock %} {% set body_id = 'folder_permissions' %} {% set page_heading = 'Folder permissions' %} {% block body %} {{ super() }} {% if err_msg %}

{{ err_msg|newlines }}

{% else %} {% set old_access = current_permissions.access if current_permissions else FolderPermission.ACCESS_NONE %} {# It is checked for here, but note that this page does not expect to receive current_permissions where the group ID is different. The UI may in fact fall back to the Public group if there are no permissions defined for group Foo, however this would make the admin here too confusing. In this scenario we instead expect current_permissions to be None, and we will display "no permissions have been defined for group Foo". #} {% set permissions_inherited = current_permissions and (current_permissions.folder.id != folder.id or current_permissions.group.id != group.id) %}

The image server controls who can view, upload, and manage images by looking for permissions on folders in your image repository. Your folders are arranged in a hierarchy (a tree structure) and the permissions work in the same way. When you set the permission on a folder, it is inherited by all that folder's sub-folders (and their sub-folders, and so on). The permissions set on your image repository's root folder therefore act as the system-wide defaults.

Folder permissions are defined on a per-group basis. The special Public group represents anonymous users, those who are not logged into the image server itself. If you are using the image server alongside a public-facing web site, this is where the vast majority of image requests will come from. Image server users that are logged in may belong to several groups. In this case the user will be granted the most permissive access that the combination of all their groups provides. This might be hard to follow, so there is a tool that can calculate the overall folder permission for a single user .

Folder selection

You are viewing permissions for:
{{ 'The root folder' if folder_is_root else 'Folder '+folder.path }} and group {% include "admin_inc_group_select.html" %}

Current permissions (change)

{% if current_permissions %} The "{{ group.name }}" group has the following permissions set {% if folder_is_root %} for the root folder: {% else %} for folder {{ folder.path }}: {% endif %} {% from "admin_inc_permissions.html" import access_level_bullets with context %} {{ access_level_bullets(old_access) }} Info {% if permissions_inherited %} This permission is inherited from {% if current_permissions.folder.id == 1 %} the root folder {% else %} {{ current_permissions.folder.path }} {% endif %} . {% else %} {% if folder_is_root %} This also serves as the default permission for all other folders. {% else %} This permission is specific to this folder and its sub-folders. {% endif %} {% endif %} {% else %} Info No folder permissions have been defined for the "{{ group.name }}" group. {% endif %}

Change permissions

For this folder and all its sub-folders (unless overridden), allow the "{{ group.name }}" group to:
{% set create = (not current_permissions) or permissions_inherited %} {% set form_method = 'post' if create else 'put' %} {% set form_action = url_for('api.admin-folderpermission') if create else url_for('api.admin-folderpermission', permission_id=current_permissions.id) %}
 

{# Allow delete of the permissions record if it's not inherited and is not a root folder entry for the Public or Normal Users system groups #} {% if current_permissions and (not permissions_inherited) and ((folder_is_root == false) or (group.id != GROUP_ID_PUBLIC and group.id != GROUP_ID_EVERYONE)) %}

Reset permissions

Clear the override on this folder so that it reverts to standard permissions.

{% endif %}
{% endif %} {% endblock %}