Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement, EC]: Display read-only asset metadata when granted view permission #524

Merged
merged 3 commits into from
May 22, 2024
Merged
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#### v1.5.0
- [Assets] Metadata can be now displayed as a read-only tab when the user is granted `view` permissions to the asset.

#### v1.4.0
- [DataObject] Password data type algorithms other than `password_hash` are deprecated since `pimcore/pimcore:^11.2` and will be removed in `pimcore/pimcore:^12`.

Expand Down
2 changes: 1 addition & 1 deletion public/js/pimcore/asset/archive.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pimcore.asset.archive = Class.create(pimcore.asset.asset, {
var items = [];
var user = pimcore.globalmanager.get("user");

if (this.isAllowed("publish")) {
if (this.isAllowed("view") || this.isAllowed("publish")) {
items.push(this.metadata.getLayout());
}
if (this.isAllowed("properties")) {
Expand Down
2 changes: 1 addition & 1 deletion public/js/pimcore/asset/audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pimcore.asset.audio = Class.create(pimcore.asset.asset, {

items.push(this.getEditPanel());

if (this.isAllowed("publish")) {
if (this.isAllowed("view") || this.isAllowed("publish")) {
items.push(this.metadata.getLayout());
}
if (this.isAllowed("properties")) {
Expand Down
2 changes: 1 addition & 1 deletion public/js/pimcore/asset/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pimcore.asset.document = Class.create(pimcore.asset.asset, {
items.push(this.getEditPanel());
}

if (this.isAllowed("publish")) {
if (this.isAllowed("view") || this.isAllowed("publish")) {
items.push(this.metadata.getLayout());
}
if (this.isAllowed("properties")) {
Expand Down
2 changes: 1 addition & 1 deletion public/js/pimcore/asset/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pimcore.asset.image = Class.create(pimcore.asset.asset, {
items.push(embeddedMetaDataPanel);
}

if (this.isAllowed("publish")) {
if (this.isAllowed("view") || this.isAllowed("publish")) {
items.push(this.metadata.getLayout());
}
if (this.isAllowed("properties")) {
Expand Down
Loading
Loading