alfresco-share

How to hide create site link for particular user

孤者浪人 提交于 2019-12-05 13:34:33
I am on Alfresco 4.2e Community Edition.I am able to restrict site creation for a particular group by modifying the following files. In public-services-security-context.xml org.alfresco.service.cmr.site.SiteService.createSite=ACL_METHOD.ROLE_ADMINISTRATOR,ACL_METHOD.GROUP_SITECREATORS In sites.get.js and mysites.get.js I added this var createSiteVisible = userHasGroup(user.name, 'SITECREATORS'); model.createSiteVisible = createSiteVisible; function userHasGroup(username, group) { var result = remote.call("/api/people/" + stringUtils.urlEncode(username) + "?groups=true"); if (result.status ==

How to Delete Document Using CMIS

我的梦境 提交于 2019-12-05 08:08:27
问题 I have Created a External web application using Servlets which is connected to alfresco repository. I am also able to upload document in to the repository, download document from repository. now my requirement is, i have to delete document based on user role. means i want to give delete document access to only site manager. Please provide sample code if you have. Thanks in Advance 回答1: In order to delete a document you first need to see if the user have the role to delete this is why the

alfresco: limiting authority.ftl to a group of users

北战南征 提交于 2019-12-04 15:51:46
In my workflow model I have an association to cm:person type, in share configuration I'm using the authority.ftl template to display it, how can I limit the available users to select from down to the members of one group ? There s a few changes that I needed to do in order to achieve this: You should pass a parameter to your authority.ftl in your share modules config file using a new control param: <config evaluator="node-type" condition="my:customtype"> <forms> <form> <appearance> <field id="my:personproperty"> <control template="/org/alfresco/components/form/controls/authority.ftl"> <control

How to Delete Document Using CMIS

隐身守侯 提交于 2019-12-03 23:15:57
I have Created a External web application using Servlets which is connected to alfresco repository. I am also able to upload document in to the repository, download document from repository. now my requirement is, i have to delete document based on user role. means i want to give delete document access to only site manager. Please provide sample code if you have. Thanks in Advance In order to delete a document you first need to see if the user have the role to delete this is why the answer will be split in two part Part 1 : search for authority in this part you will see if the user have the

Alfresco webscript to get the list of all files and folder with their size

梦想与她 提交于 2019-12-02 22:45:06
问题 Need a js based alfresco webscript to get the list of all folders and files recursively alond with their size. 回答1: CMIS Query: select cmis:objectId, cmis:name, cmis:contentStreamLength from cmis:document where cmis:contentStreamLength>0 order by cmis:contentStreamLength desc HTTP GET: http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/browser/ ?cmisselector=query &succinct=true &q=select cmis:objectId, cmis:name, cmis:contentStreamLength from cmis:document where cmis

Connection with alfresco cmis

半世苍凉 提交于 2019-12-02 16:57:45
问题 I am trying to connect alfresco using config parameters but i am getting error: Config: sessionParameters.put(SessionParameter.USER, "admin"); sessionParameters.put(SessionParameter.PASSWORD, "admin"); sessionParameters.put(SessionParameter.ATOMPUB_URL, "http://localhost:8080/alfresco/service/cmis"); sessionParameters.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value()); sessionParameters.put(SessionParameter.REPOSITORY_ID, "CIPBASE"); sessionParameters.put(SessionParameter.AUTH

How to get Acls of a document?

試著忘記壹切 提交于 2019-12-02 14:43:15
问题 I am have created document in repository... and I have set Acls Like below... public void setPermissionsToDocument(Session session, List<String> users, String documentPath) { List<String> permissions = new LinkedList<String>(); List<Ace> addAces = new LinkedList<Ace>(); // permissions.add(BasicPermissions.WRITE); permissions.add(PermissionService.TAKE_OWNERSHIP); for (String user : users) { Ace addAce = session.getObjectFactory().createAce(user, permissions); addAces.add(addAce); } Document

Alfresco webscript to get the list of all files and folder with their size

≡放荡痞女 提交于 2019-12-02 13:56:13
Need a js based alfresco webscript to get the list of all folders and files recursively alond with their size. CMIS Query: select cmis:objectId, cmis:name, cmis:contentStreamLength from cmis:document where cmis:contentStreamLength>0 order by cmis:contentStreamLength desc HTTP GET: http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/browser/ ?cmisselector=query &succinct=true &q=select cmis:objectId, cmis:name, cmis:contentStreamLength from cmis:document where cmis:contentStreamLength>0 order by cmis:contentStreamLength desc JavaScript: Use search root object : search - org

Connection with alfresco cmis

依然范特西╮ 提交于 2019-12-02 09:25:51
I am trying to connect alfresco using config parameters but i am getting error: Config: sessionParameters.put(SessionParameter.USER, "admin"); sessionParameters.put(SessionParameter.PASSWORD, "admin"); sessionParameters.put(SessionParameter.ATOMPUB_URL, "http://localhost:8080/alfresco/service/cmis"); sessionParameters.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value()); sessionParameters.put(SessionParameter.REPOSITORY_ID, "CIPBASE"); sessionParameters.put(SessionParameter.AUTH_HTTP_BASIC, "true" ); sessionParameters.put(SessionParameter.COOKIES, "true" ); Error is: org.apache

How to create site in share programmatically?

混江龙づ霸主 提交于 2019-12-02 08:06:31
This topic has been up quite some times in the community (forums, blog posts etc) and the conclusion is that this should be done making a REST Post call to share and the url /service/modules/create-site The reason is that some surf specific stuff like the site dashboard are created from the share side. However, I have been trying this approach from different angles all day, always ending up with a HTTP 200 in the response and no share site created. Quite frustrating. I'm running this on Alfresco Enterprise 4.2.3.3 (I suspect my problems is due to a recent change) To strip this down to