Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,26 @@ Get strings for a specific language
/api/lokalize/project/{name}/{local}?token=*apitoken*
```

# Access control
Cockpit-Admin users have full access to all contols. For non-admin-users the following access-levels can be defined on the group level:
- `manage` => General access to the Lokalize-addon
- `projects_create` => Ability to create a Lokalize-project
- `projects_delete` => Ability to delete any Lokalize-project
- `keys_delete` => Ability to delete a individual keys within any Lokalize-project

Here is an example group-rights-config for lokalize:
```php
$configs["groups"] = [
"localizer" => [
"$admin" => false,
"lokalize" => [
"manage" => true,
"projects_create" => true
]
]
];
```

### 💐 SPONSORED BY

[![ginetta](https://user-images.githubusercontent.com/321047/29219315-f1594924-7eb7-11e7-9d58-4dcf3f0ad6d6.png)](https://www.ginetta.net)<br>
Expand Down
2 changes: 2 additions & 0 deletions views/project.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@

<div class="uk-margin-small-left">
<a class="uk-display-block" onclick="{ parent.duplicateKey }" title="@lang('Duplicate Key')"><i class="uk-icon-copy uk-icon-button"></i></a>
@hasaccess?('lokalize', 'keys_delete')
<a class="uk-display-block uk-margin-small-top" onclick="{ parent.removeKey }" title="@lang('Delete Key')"><i class="uk-icon-trash-o uk-icon-button"></i></a>
@end
</div>

</div>
Expand Down