@if ($album->is_permissions_inherited)

@lang('admin.album_inheriting_permissions_p1')

@lang('admin.album_inheriting_permissions_p2')

@lang('admin.album_inheriting_permissions_p3', [ 'l_parent_start' => sprintf('', route('albums.show', [$album->effectiveAlbumIDForPermissions(), 'tab' => 'permissions'])), 'l_parent_end' => '', 'l_edit_start' => sprintf('', route('albums.edit', [$album->id])), 'l_edit_end' => '' ])

@else

@lang('admin.security_heading')

@lang('admin.security_text')


@lang('admin.security_groups_heading')
{{ csrf_field() }} @if (count($existing_groups) > 0)
@foreach ($existing_groups as $group) @include(Theme::viewName('partials.album_permissions'), [ 'key_id' => 'group_' . $group->id, 'object_id' => $group->id, 'title' => $group->name, 'callback' => [$album, 'doesGroupHavePermission'], 'callback_object' => $group, 'parent_id' => 'groups-accordion' ]) @endforeach
@endif

@lang('admin.security_users_heading')
{{ csrf_field() }}
{{-- Anonymous users --}} @include(Theme::viewName('partials.album_permissions'), [ 'key_id' => 'anonymous', 'object_id' => 'anonymous', 'title' => trans('admin.anonymous_users'), 'callback' => [$album, 'doesUserHavePermission'], 'callback_object' => null, 'parent_id' => 'users-accordion' ]) @foreach ($existing_users as $user) @include(Theme::viewName('partials.album_permissions'), [ 'key_id' => 'user_' . $user->id, 'object_id' => $user->id, 'title' => $user->name, 'callback' => [$album, 'doesUserHavePermission'], 'callback_object' => $user, 'parent_id' => 'users-accordion' ]) @endforeach
@endif