<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Allow site admins to view items deleted by all site users in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/allow-site-admins-to-view-items-deleted-by-all-site-users/m-p/117461#M32487</link>
    <description>&lt;P&gt;How to allow site admins to view items deleted by all site users. Is there any permission Group as to allow these facility or what can be done?&lt;/P&gt;</description>
    <pubDate>Thu, 17 Sep 2020 05:56:12 GMT</pubDate>
    <dc:creator>Pravesh</dc:creator>
    <dc:date>2020-09-17T05:56:12Z</dc:date>
    <item>
      <title>Allow site admins to view items deleted by all site users</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/allow-site-admins-to-view-items-deleted-by-all-site-users/m-p/117461#M32487</link>
      <description>&lt;P&gt;How to allow site admins to view items deleted by all site users. Is there any permission Group as to allow these facility or what can be done?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 05:56:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/allow-site-admins-to-view-items-deleted-by-all-site-users/m-p/117461#M32487</guid>
      <dc:creator>Pravesh</dc:creator>
      <dc:date>2020-09-17T05:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: Allow site admins to view items deleted by all site users</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/allow-site-admins-to-view-items-deleted-by-all-site-users/m-p/117462#M32488</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Trashcan is not site specific.On Profile page it is no possible to decide that current user is site admin or not.Role will decode within site.&lt;/P&gt;&lt;P&gt;It may be possible that for 1-site user is site admin and 2-site same user having consumer role.&lt;/P&gt;&lt;P&gt;Refer Link.&lt;/P&gt;&lt;P&gt;&lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-forum/how-to-restrict-to-empty-trashcan/td-p/293906" target="_blank" rel="noopener nofollow noreferrer"&gt;https://hub.alfresco.com/t5/alfresco-content-services-forum/how-to-restrict-to-empty-trashcan/td-p/293906&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 06:22:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/allow-site-admins-to-view-items-deleted-by-all-site-users/m-p/117462#M32488</guid>
      <dc:creator>sp2</dc:creator>
      <dc:date>2020-09-17T06:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Allow site admins to view items deleted by all site users</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/allow-site-admins-to-view-items-deleted-by-all-site-users/m-p/117463#M32489</link>
      <description>&lt;P&gt;Need to rephrase the question.&amp;nbsp;Allow site admins to view items deleted by all users of same site&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 08:29:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/allow-site-admins-to-view-items-deleted-by-all-site-users/m-p/117463#M32489</guid>
      <dc:creator>Pravesh</dc:creator>
      <dc:date>2020-09-17T08:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Allow site admins to view items deleted by all site users</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/allow-site-admins-to-view-items-deleted-by-all-site-users/m-p/117464#M32490</link>
      <description>&lt;P&gt;User trash can is specific to each user, so even if a user is manager in site or part of SITE_ADMINISTRATORS group, he/she can see files/folders deleted by himself/herself only (i.e. where he/she is owner of file/folder), Unless user is Administrator (part of ALFRESCO_ADMINISTRATORS group which basically gives FULL_CONTROL permission on repo).&lt;/P&gt;
&lt;P&gt;An admin can see files/folders deleted by every user is trash can.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Permissions are checked at the core and api level:&amp;nbsp;&lt;A href="https://github.com/Alfresco/alfresco-remote-api/blob/master/src/main/resources/alfresco/templates/webscripts/org/alfresco/repository/archive/archivednodes.get.desc.xml" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/Alfresco/alfresco-remote-api/blob/master/src/main/resources/alfresco/templates/webscripts/org/alfresco/repository/archive/archivednodes.get.desc.xml&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If user has has FULL_CONTROL permission on node or user has originally deleted the files/foldders then files/folders appear/added to trash can view.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Alfresco/alfresco-remote-api/blob/master/src/main/java/org/alfresco/repo/web/scripts/archive/AbstractArchivedNodeWebScript.java#L194" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/Alfresco/alfresco-remote-api/blob/master/src/main/java/org/alfresco/repo/web/scripts/archive/AbstractArchivedNodeWebScript.java#L194&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Alfresco/alfresco-repository/blob/alfresco-repository-6.8/src/main/java/org/alfresco/repo/node/archive/NodeArchiveServiceImpl.java#L655" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/Alfresco/alfresco-repository/blob/alfresco-repository-6.8/src/main/java/org/alfresco/repo/node/archive/NodeArchiveServiceImpl.java#L655&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;public boolean hasFullAccess(NodeRef nodeRef)
    {
        ParameterCheck.mandatory("nodeRef", nodeRef);

        String currentUser = getCurrentUser();        
&lt;STRONG&gt;        if (hasAdminAccess(currentUser))
&lt;/STRONG&gt;        {
            return true;
        }
        else
        {
&lt;STRONG&gt;            String archivedBy = (String) nodeService.getProperty(nodeRef, &lt;A href="https://github.com/Alfresco/alfresco-repository/blob/master/src/main/resources/alfresco/model/systemModel.xml#L298" target="_blank" rel="noopener nofollow noreferrer"&gt;ContentModel.PROP_ARCHIVED_BY&lt;/A&gt;);
&lt;/STRONG&gt;            if(!userNamesAreCaseSensitive &amp;amp;&amp;amp; archivedBy != null)
            {
                archivedBy = archivedBy.toLowerCase();
            }
            return currentUser.equals(archivedBy);
        }
    }&lt;/PRE&gt;
&lt;P&gt;The simplest way for you would be, to make the authorised user as admin whome you want to allow to see files/folders deleted by all users if that matches your use case.&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;create custom endpoint and extend usertrash can functionality to call your custom endpoint and return archive nodes to authorised users, you can find an example of extending trashcan here:&amp;nbsp;&lt;A href="https://javaworld-abhinav.blogspot.com/2020/01/display-more-than-50-items-per-page-in.html" target="_blank" rel="noopener nofollow noreferrer"&gt;https://javaworld-abhinav.blogspot.com/2020/01/display-more-than-50-items-per-page-in.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Or extend the apis (given above) [&lt;STRONG&gt;NOT RECOMMENDED&lt;/STRONG&gt;]&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 14:09:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/allow-site-admins-to-view-items-deleted-by-all-site-users/m-p/117464#M32490</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-09-17T14:09:04Z</dc:date>
    </item>
  </channel>
</rss>

