cancel
Showing results for 
Search instead for 
Did you mean: 

adf-sites-dropdown - Can view sites that user is not a member of.

stephenl
Champ on-the-rise
Champ on-the-rise

Hi,

Just getting upto speed with some of the controls and I've used the adf-sites-dropdown as follows but it always shows all the sites available rather than just the ones that the current user is a member of.

I am testing against a SDK 3.1.0 repo project that I've run from the command line to use as the repository as an interim test (Alfresco 5.2.f). ADF 4.0 & 4.1.

<adf-sites-dropdown (change)="onSiteChange($event)" relations="members" [placeholder]="'NODE_SELECTOR.SELECT_LOCATION'">
</adf-sites-dropdown>

I've tried:

relations="members"
[relations]="members"
[relations]="'members'" (taken from alfresco-ng2-components/demo-shell, single quote included)

But to no avail, always displays 

> My Files
> SWSDP (default site, which the user is a member of)
> second site (user not a member)

Any pointers are directions to raise a bug/defect report would be helpful.

Thanks,

Stephen

5 REPLIES 5

EddieMay
World-Class Innovator
World-Class Innovator

Hi @stephenl 

I'm not sure "relations" is supported. If you feel this is a defect or a feature reqest, you can raise it at https://github.com/Alfresco/alfresco-ng2-components

HTH,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!

stephenl
Champ on-the-rise
Champ on-the-rise

Hi @EddieMay 

There seems to either be missing functionality or a mistake in the documentation as relations is definately mentioned in the property list for adf-sites-dropdown at docs/content-services/components/sites-dropdown.component. 

relationsstring Filter for the results of the sites query. Possible values are "members" and "containers". When "members" is used, the site list will be restricted to the sites that the user is a member of.

Unless of course I have overseen versioning or something related with regards to Alfresco repo 5.2f and or ADF versioning etc.

Regards,

Stephen

EddieMay
World-Class Innovator
World-Class Innovator

Hi @stephenl 

That looks like an error on my part - apologies!

The documentation implies that no value by default restricts sites the user is a member of:

A custom list of sites to be displayed by the dropdown. 
If no value is given, the sites of the current user are displayed by default.

Where are you attempting to use it? It is used in the destination picker when performing copy/move for selected nodes.

Am I again missing something?

Cheers,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!

stephenl
Champ on-the-rise
Champ on-the-rise

Hi @EddieMay 

Thanks for the input, I've tried to use it in the same way as demonstrated in the alfresco-ng2-components demo shell application. Under the "Content Services" option it opens up a Document List (with full header etc.) and it seems to re-populate as expected when the site drop-down's option is changed.

Even under the demo shell application the same thing appears to happen, log in with a lower permission user that is not part of some of the sites and all of them are still displayed in the drop-down. The example I used was the files.component.html . I did try it in my own test application with both "'members'" (as per the demo shell) and "members" (quotes if not visible).

<div *ngIf="showSitePicker" class="app-site-container-style" id="site-container">
    <adf-sites-dropdown (change)="onSiteChange($event)" [hideMyFiles]="false" relations="members" [placeholder]="'NODE_SELECTOR.SELECT_LOCATION'">
    </adf-sites-dropdown>
  </div>

I have just noticed however that my limited user cannot upload files as he doesn't have permissions (detailed in the upload dialog boxafter dragging and dropping). So maybe all sites are actually visible to all users by default, it's maybe just actions that are disabled if you're not a member.

The 'copy to' dialog that you mention also exhibits the same issue and again only allows copying to sites that the user is a member of. The other sites' folders are navigable but not selectable as a valide destination.

Regards,

Stephen