cancel
Showing results for 
Search instead for 
Did you mean: 

Adding user to a group

chinitovela
Champ in-the-making
Champ in-the-making
Hi,
I am doing a small project and I need to create a custom user, from the topics that I've read so far creating a custom user through the java api is currently under development.
http://forums.alfresco.com/en/viewtopic.php?p=21927
I wanted to create custom users because their permission will change according to the points that they earn.. by the way, the small project I'm talking about is like a forum but with a lot of functionality like creating a folder(space), uploading documents, etc.. , that is already in the alfresco. Now I am wondering if I can just create a set of groups that will have a corresponding permission level and the user should be added to that certain group programmatically. Is it possible in webscript?  any tips on how to do this?

Thanks a lot,
Chonchon
3 REPLIES 3

norgan
Champ in-the-making
Champ in-the-making
Hello ChonChon,
do I understand you correctly, that you want users to earn points with their activity and get rights according to their score. Correct?
Question 1: Will this be global or with regard to special folders ?

Question 2: This sounds to me, as if you are not trying to create custom users, but a custom role modell with different roles. These additional roles can then be assigned to your own groups.  The user is added/removed from groups according to his "earning" points. So the rights-assignment-logic would be in rank-changing and not during runtime. So the system would look something like this :
  • (optional)You create your extended role modell with more  differentiations than reader, editor, contributor, coeditor, manager

  • You create a set of groups, assigning each groups its corresponding rights with the spaces in question

  • user is created and assiged to the entrylevel group, ment for users with score 0

  • Your "point earning logic" assigned points to a user

  • if user earns points, then checkRank(user)

  • if user has earned new rank, move user to group level 2
No custom user needed for that, not even a custom rolemodell. Just a lot of bookkeeping, which group has which rights on what space.

Question 3: You plan to build your own forum system based on alfresco? Why ?! Sounds to me like calling a FedEx Heavyload Truck to deliver a letter to your neighbor, 2 doors over.

Regards, Norgan

chinitovela
Champ in-the-making
Champ in-the-making
Hi Norgan,

For your first question: Yes it is for global..

For your second question: At first I am thinking of creating a custom users but found out on this forum that it is not well supported yet. Most of your assumptions are right especially on the part on the "point earning logic" then if the user earned enough points, the user will move to group level 2. How can I do this in webscripts, I mean, how to change the user's group programmatically?..

For your third question: That was funny.. but the project I am working on just seems like forums when it comes to pointing system.. but it also has other functionality like upload documents, register user, create own folder, discussions, chat and so on, and all the user interface must be done in flex..

Thanks a bunch,
Chonchon

prachi
Champ in-the-making
Champ in-the-making
Hi
Did you get any solution for creating users/roles?

Thanks in advance.
Cheers,
Prachi.