CMDBuild Forum

Users as a class

Hi there,

 

I wonder if there is a way to utilise users as a class.

Basically, I have a number of CMDBuild users registered, and they are visible under Users and Groups. Now I want to have a domain 'Owner' to define a relation: which equipment is used by which user.

The problem is that when I am trying to define a class named 'User' CMDBuild tells me that such class already exists. However I did not create such class and I don't see it in the lookup of available classes when trying to create a domain.

So is there a way to have my CMDBuild users appear as a class automatically, or should I create a class named 'Person' (since 'User' is somehow reserved) and populate it with my users manually (which would be rather clumsy and inappropriate)?

The answer is probably somewhere in the manuals, but unfortunately my Italian is pretty poor.

Thanks in advance.

Same need here.

Previously Vladimir wrote:

Hi there,

 

I wonder if there is a way to utilise users as a class.

Basically, I have a number of CMDBuild users registered, and they are visible under Users and Groups. Now I want to have a domain 'Owner' to define a relation: which equipment is used by which user.

The problem is that when I am trying to define a class named 'User' CMDBuild tells me that such class already exists. However I did not create such class and I don't see it in the lookup of available classes when trying to create a domain.

So is there a way to have my CMDBuild users appear as a class automatically, or should I create a class named 'Person' (since 'User' is somehow reserved) and populate it with my users manually (which would be rather clumsy and inappropriate)?

The answer is probably somewhere in the manuals, but unfortunately my Italian is pretty poor.

Thanks in advance.

 

Domenico ha scritto:

Same need here.

Previously Vladimir wrote:

Hi there,

 

I wonder if there is a way to utilise users as a class.

Basically, I have a number of CMDBuild users registered, and they are visible under Users and Groups. Now I want to have a domain 'Owner' to define a relation: which equipment is used by which user.

The problem is that when I am trying to define a class named 'User' CMDBuild tells me that such class already exists. However I did not create such class and I don't see it in the lookup of available classes when trying to create a domain.

So is there a way to have my CMDBuild users appear as a class automatically, or should I create a class named 'Person' (since 'User' is somehow reserved) and populate it with my users manually (which would be rather clumsy and inappropriate)?

The answer is probably somewhere in the manuals, but unfortunately my Italian is pretty poor.

Thanks in advance.

 

Hi, 
I have the same need. Can someone please reply
Thanks in advance

Hi,

the system class "User" contains the list of the authenticated
CMDBuild users (that is the CMDBuild accounts, usually some tens) and with
only some system information (username, password, email).</p>

 

The class named Person (or others with similar names) will contain the list of all the people involved in the CMDBuild activities (that is the company's employees,

usually many more) and with all the attributes you need.

 

In this way some records can be duplicated but normally it is a very limited number.

 

Fabio

This is an old thread but I was wondering if we could resurrect it as a feature request. I have over 100 users and maintaining separate classes is not optimal.

 

While I understand there's minimal duplication it's the maintenance of the records that's difficult.

 

The user logs in with the ID created in the "User" class. But all their contact information is in the "Person" class that was created separately. We don't allow most users to make updates but we want each user to be able to update his/her own contact information to reduce administrative over head.

 

Perhaps you could make the "User" class extensible with custom attributes?

Normally in the class “User” are handled dozens of cards (IT technicians who use CMDBuild), while in the class “Person” (or similar) are handled  thousands of card (all the employees).
Therefore it is not convenient to make a complex change to the “core” code, useful only in a few cases.
CMDBuild Team

Dear Josh,

 

I believed that technoteca would like to limit the supportability of such change. It will be very difficult to support if there are too many variant of the CMDBuild code. The answer to your question is yes there is a way to enable the use of "User" class just like any regular class you created. But let me caution you before I proceed.

 

1. Do this at your own risk. I am not responsible for any damage to your CMDBuild database if you try this method. Maybe your should try it with a development instance first before deploying it

in your production server.

 

2. You must have CMDBuild version 2.1.8. This is the only version that I have tried this and it work successfully. You may try with older version but I never did this with older version. So, I cannot comment on it.

 

3. There will be no support neither from me nor Technoteca. So you are basically on your own once you venture into this dark corner.

 

The steps would be:

 

1. Use the psql client of your choice and run this sql command on cmdbuild database.

 

COMMENT ON TABLE "User" IS 'MODE: write|TYPE: class|DESCR: Users|SUPERCLASS: false|MANAGER: class|STATUS: active';

 

 

2. Restart CMDBuild service.

 

3. Run browser and go to the admin page. Go to Setup and Server Management then press all three buttons clear cache, service sync and unlock all card.

 

4. Press F5 to refresh your browser.

 

You will see the "Users" class listed in the Class List. You can later manipulate this class just like any other class with these recommendation.

 

1. Do not add users from the end user interface. Always use the admin page to add user.

2. Hide password attribute. Don't let users change password within the card edit. The password may be unencrypted and the user could not log on afterward.

 

The good things I found so far,

 

1. I can add many other attributes to the User class without much fuss and they work brilliantly.

2. I can add domain base on User class and then create a Reference attribute. These attributes however are not available in the User management interface. You can only edit these attributes in the Card edit.

3. If you create filter base on the user reference attribute, cmdbuild give you a nice variable base choice * Logged User *. This is the current user logged on to cmdbuild so you can dynamically filter by each logged on user.

 

Somehow, I believe that technoteca developers subconsciously already plan for this feature in the future but disable them for the time being because they are not ready. Like I said, for now we are on our own with this mod. Don't expect technoteca to help us with proper support until they declare this function as official.

 

To reset the User class to it original state run this sql command

 

COMMENT ON TABLE "User" IS 'MODE: reserved|TYPE: class|DESCR: Users|SUPERCLASS: false|MANAGER: class|STATUS: active';

 

 

Good Luck.

 

 

 

 

 

 

 

Previously Josh wrote:

This is an old thread but I was wondering if we could resurrect it as a feature request. I have over 100 users and maintaining separate classes is not optimal.

 

While I understand there's minimal duplication it's the maintenance of the records that's difficult.

 

The user logs in with the ID created in the "User" class. But all their contact information is in the "Person" class that was created separately. We don't allow most users to make updates but we want each user to be able to update his/her own contact information to reduce administrative over head.

 

Perhaps you could make the "User" class extensible with custom attributes?

 

1 Like