How to get all the documents uploaded by the user in alfresco - alfresco

I am new to alfresco.
Is it possible to get list of all the documents created and uploaded by the user and populating these values in a custom dashlet?

If you look at http://localhost:8080/alfresco/service/index it will tell you about all the webscripts currently available. If you can, you probably want to use an existing webscript to get your data, though writing your own one isn't too bad - this would get you started.
I think that for your use case, the "user feed" should give you the info you need. Visit http://localhost:8080/alfresco/service/script/org/alfresco/repository/activities/feed/userfeed.get when your repo is running and it'll tell you the details about the webscript

Hmm If it's in Share then you have a content tab on the user profile, which shows all the users content. You can load that webscript into the Dashlet.

Related

Having Guest access to a document - should this allow users to search for this document?

I am working with an Alfresco customer that has content that has the "Guest" permission on entire spaces within Alfresco.
But they claim that Alfresco search does not allow users to find this content using Alfresco Search, even though if they were to have the URL directly, they would in fact be able to open and view this content.
Google Drive has a similar behavior to this referred to as Link Sharing:
So in Google Drive, you can have access to a document but only if you have the URL to the document.
Does this same sort of thing exist in alfresco?
I am using the CMIS api to access alfresco document metadata.
Is there some "anyone-with-link" property/metadata that I should be using to determine if I should allow the document to be indexed in search or not?
Yes, Alfresco has functionality called "quick share" which allows anyone with the link to access the document. That is not the same thing has having Guest access on a space or on a document.
However, I am confused about your question because everything gets indexed into Solr regardless of permissions, unless it has the index control aspect set on it, which would have had to have been added to explicitly exclude the object from being indexed.
Maybe what your customer means is that logging in as Guest in Alfresco Share or via CMIS is not supported.
Bottom-line is if your application is using a non-Guest service account to make the CMIS calls, it should be able to do whatever searches or queries it needs to to find the documents, provided the service account has permission to see the results.

Alfresco Repository Activity

I would like to see the users activities made in the general repository, without using a site (upload docs,...) in the user dashboard, I have only managed to see the acvitities performed inside user sites. is it possible to do something like this?
Thanks in advance
It's possible to create your own activities via the activities services.
Use the postActivity to post your own custom activity. The problem remains that you need a required parameter siteId.
Probably you can just fill in Repository and if that doesn't work, just create a public site called Repository so it does exist for your need.
You'll need to create a Behaviour to trigger these post as well.

Wanted to make alfresco site read only

Want to make alfresco site read only in alfresco community 5.0 so that no one can make any changes or edit that during migration.
I already tried changing the user/group permissions but that method doesn't work properly. Is there any other way to make the sites read only?
You need to make all sites in read only mode and so entire Repository should be in read-only mode for migration!
Try this property in your alfresco-global.prop file
server.allowWrite=false
Please check this for reference
The best way to make a site read only would probably be to modify all members of that site to have the consumer role (this would prevent them for creating new content or editing any existing content).
Unfortunately there is no bulk capability built into the UI to do this, however it should be a relatively straightforward exercise to create an admin only custom WebScript to achieve this. It would necessary for the Admin to become the site manager of each site before attempting to change the role of each site member, but there is an API for doing this.
Alternatively (if you have only a few sites) then you could do this manually through the UI using the Site Management Admin Console page. Again, the Admin would need to become the Site Manager for each Site and then visit the site and change the role of every member.
As suggested by #DaveDraper in a former answer, you could setup site memberships to the consumer role. However, this won't take into account any special permission given on a particular node (folder/document) in that site either with or without inheritance of permission.
So, if you intend to block any writes on the entire alfresco repo/site you could simply setup an extra security interceptor on your NodeService to block any write access using the NodeService.
PS : You could get some inspiration from the "NodeService_security" bean and implementation !
I can think of a turn-around or two, but those would be really sloppy so I won't be including them in this response

How to review content before publish in Umbraco CMS? (Description Inside)

I'm using umbraco CMS and creating a site like blog. Including me there are 10 members involved in
writing article's but i'm the one who needs to check the article.
All 10 members are not in a single place. The thing I want to know is if a person other than me is putting a content, I only want to decide whether to publish or not. Is there a option to set this kind of permission.
would somebody say can we done this in umbraco CMS.
Yes, this can be done.
Within the Users section, there's a node called User Types and from your description it sounds like Writer is best suited for your members. Just make sure they are set as this user type when creating/updating their respective user nodes. Most notably, they'll have the following permissions amongst others:
Create
Update
Send to Publish
There's a bunch of other permissions there that you can choose from if Writer doesn't precisely match your requirements or you could create your own user type from scratch.

Drupal (+CCK) permissions based on related node field

Suppose I have two content typs, "Job Listing" and "Job Application". A job application has a field (using the CCK module) to reference the job listing (a required field). Suppose the job application has a field "Status" with values like "new", "accepted", "rejected".
I would like to set permissions so that the job application status can only be set by the creator of the job listing it corresponds to. If there is an addon that can do this great. I would also like general direction as to how a custom addon might implement this.
(I am following the scenario in Ch. 3 of O'Reilly's "Using Drupal")
I don't know if there is a module for this but this can be done pretty easily with some custom code though.
Use hook_form_alter to add your own validate handler to the node_edit form for the application content type.
Check to see if the value has changed
Set an error is user isn't the creator or has the administer content permission.
You're done.
Directions by googletorp are on the right track but you will have to take care of some more permissions also.
Remove the edit own permission for the application content type.
Also you probably do not want author of one job listing editing the applications in response to some other job listing. This is hard to do with any built in permissions. So check in the form_alter hook that current user is the same as the author of the job listing to which the application being edited is connected to.

Resources