cancel
Showing results for 
Search instead for 
Did you mean: 

Set site favorites

michaelc
Champ on-the-rise
Champ on-the-rise
I figured this should be easy, but I can seemed to see an answer.

  it was requested that when a user is added to a site the site would be added to the users Favorites.
  Seemed simple, but I can't find it in any of the API's. 

   can anyone give me a pointer on how I would update the site as a favorite when it's added ?

  Thanks
4 REPLIES 4

mikeh
Star Contributor
Star Contributor
I've already added it to v3.4

Thanks,
Mike

michaelc
Champ on-the-rise
Champ on-the-rise
I've already added it to v3.4

Thanks,
Mike

So I can't do it in 3.3G but I can in 3.4 ?
I tried to do a post call
http://localhost/share/proxy/alfresco/api/people/a447738/preferences
Response body
   {"org":{"alfresco":{"share":{"sites":{"favourites":{"site2":true}}}}}}

   Seemed like it should work.

Or are you saying in 3.4 when you add a person to a workgroup the system now adds that group to there favs ?

mikeh
Star Contributor
Star Contributor
Sorry, I mis-read your original post. The site is now automatically added to your favourites when you *create* a site.

Yes that POST call should do it.

However, it would seem that marking a site as a favourite just because you've joined would quickly overwhelm the Sites dropdown, which is meant to hold a dozen or to maintain usability.

Thanks,
Mike

michaelc
Champ on-the-rise
Champ on-the-rise
Sorry, I mis-read your original post. The site is now automatically added to your favourites when you *create* a site.
Yes that POST call should do it.
However, it would seem that marking a site as a favourite just because you've joined would quickly overwhelm the Sites dropdown, which is meant to hold a dozen or to maintain usability.
Thanks,
Mike
Most users will only be members of 3 to 4 sites ( in our case ) so this is not an issue and you can unmark the site from the my-sites dashlet.
P.S. not my requirement but is a requirement.

SO when I post via firefox plugin REST Client I have the following
method post
url http://localhost/share/proxy/alfresco/api/people/a447738/preferences
body : {"org":{"alfresco":{"share":{"sites":{"favourites":{"site2":true}}}}}}

Response header   return code 200 , content type application/json  ( other stuff )
response body    {}

but on refresh the site was not marked as a favorite. Need to debug a bit more to see what I missed.