mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
[ADF-1605] [Destination picker] Folder cannot be selected if user has Contributor permissions on it (#2630)
fix issue by allowing to select as destination the folder with "create" permission fix display of disabled folder icon
This commit is contained in:
parent
cbc5e9ad45
commit
298012f0b0
@ -1,3 +1,3 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="16" viewBox="0 0 20 16">
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><rect id="backgroundrect" width="100%" height="100%" x="0" y="0" fill="none" stroke="none" class="" style=""/>
|
||||||
<path fill="#000" fill-opacity=".28" fill-rule="evenodd" d="M8 0H2C.9 0 0 .9 0 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2h-8L8 0z"/>
|
|
||||||
</svg>
|
<g class="currentLayer" style=""><title>Layer 1</title><path fill="#000" fill-opacity=".28" fill-rule="evenodd" d="M9.986754953861237,3.973509907722475 H3.986754953861237 C2.8867549538612365,3.973509907722475 1.986754953861237,4.8735099077224735 1.986754953861237,5.973509907722473 v12 c0,1.1 0.9,2 2,2 h16 c1.1,0 2,-0.9 2,-2 V7.973509907722473 c0,-1.1 -0.9,-2 -2,-2 h-8 L9.986754953861237,3.973509907722475 z" id="svg_1" class=""/></g></svg>
|
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 621 B |
@ -255,12 +255,12 @@ export class ContentNodeSelectorComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Selects node as choosen if it has the right permission, clears the selection otherwise
|
* Selects node as chosen if it has the right permission, clears the selection otherwise
|
||||||
*
|
*
|
||||||
* @param entry
|
* @param entry
|
||||||
*/
|
*/
|
||||||
private attemptNodeSelection(entry: MinimalNodeEntryEntity): void {
|
private attemptNodeSelection(entry: MinimalNodeEntryEntity): void {
|
||||||
if (this.contentService.hasPermission(entry, 'update')) {
|
if (this.contentService.hasPermission(entry, 'create')) {
|
||||||
this.chosenNode = entry;
|
this.chosenNode = entry;
|
||||||
} else {
|
} else {
|
||||||
this.resetChosenNode();
|
this.resetChosenNode();
|
||||||
|
@ -92,6 +92,14 @@ export class ShareDataTableAdapter implements DataTableAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (col.key === '$thumbnail') {
|
if (col.key === '$thumbnail') {
|
||||||
|
|
||||||
|
if (this.imageResolver) {
|
||||||
|
let resolved = this.imageResolver(row, col);
|
||||||
|
if (resolved) {
|
||||||
|
return resolved;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const node = (<ShareDataRow> row).node;
|
const node = (<ShareDataRow> row).node;
|
||||||
|
|
||||||
if (node.entry.isFolder) {
|
if (node.entry.isFolder) {
|
||||||
|
@ -123,7 +123,7 @@ export class NodeActionsService {
|
|||||||
|
|
||||||
private imageResolver(row: ShareDataRow, col: DataColumn): string|null {
|
private imageResolver(row: ShareDataRow, col: DataColumn): string|null {
|
||||||
const entry: MinimalNodeEntryEntity = row.node.entry;
|
const entry: MinimalNodeEntryEntity = row.node.entry;
|
||||||
if (!this.contentService.hasPermission(entry, 'update')) {
|
if (!this.contentService.hasPermission(entry, 'create')) {
|
||||||
return this.documentListService.getMimeTypeIcon('disable/folder');
|
return this.documentListService.getMimeTypeIcon('disable/folder');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user