Editing and Deleting users

Hi all,


We have an online service that requires a separate user management - we decided to let matrix handle this by creating users using asset builder (only the service Admin can do this)



My question is: is there a way to let them edit/delete the users they have created without having to go into the backend interface? He is definitely not a "techy" user - the backend interface is a bit too complicated for him.



I have created an asset listing to list all the users under their groups (this is also a new feature required), but the link to the user asset doesn't take me anywhere?



Appreciate your responses.



Cheers,

Petula

You can easily add a trigger to delete the users, as long as the user deleting them as write access.


Create a add link trigger action that then links the asset to the trash and unlinks all other links.



Alternetly, you can compibine a trigger with the jQuery Matrix plugin, or use the Matrix Javascript API to delete assets directly.

Thanks for your reply - I am still quite confused as to how to add this trigger…


Will I have to create a link manager so that the user can click which one they want to delete, and on submit it adds a link to the trash (?) then this trigger will fire off and delete all other links?



Thanks for your help.



Cheers,

Petula

On your Asset Map


System Management Folder (Where all sysadmin users are)



Trigger Manager > New Child > Triggers > Trigger



Then just read through it, should be easy enough :~)

For more information on Triggers have a look at the MySource Matrix Triggers manual.

yes thanks - already looking at the triggers manual. I think what I am confused about is what would fire this trigger? Have a button on a page to delete the user?

Also, I still haven't figured out how to edit the user details - how come we can't link to the edit page of the user from the asset listing? :frowning:

I haven't worked much with Triggers, but what I get from them is that its an automatic thing when something is created, it has a set of rules and if it doesn't meet the rules or you want to delete something in particular it deletes it.

Triggers are fired by events. Such as asset created, asset accessed, metadata updated, etc. There are tons of them.


You then set conditions, which need to be pretty restrictive in order to not cause a load on the system.



Lastly, you will add your actions.





In this case, you will want the asset accessed event. This means, when a URL is visited, the trigger will be fired. So, in the conditions, set root node, to where your assets are located and also add URL Match. Set the URL match to be something like action=delete_asset. So, if you set up the trigger correctly, you could then click the delete link that you have formed, which the href would look something like: http://www.mysite.com?action=delete_asset. You can add some ajax to do this in the background, which is what the jQuery Matrix plugin does.



Triggers can be tricky, but are very powerful. Really, they are more of an advanced functionality of Matrix, as they take some time getting used to how they can work.

Thanks Nic - just looking at your jQuery matrix plugin page.


Trying to get it to work, but seems when I click on the "delete asset" link it just takes me to the %asset_url%? Does that mean my function didn't bind? I included the jquery.matrix.js file, and then just copied the code off your page… Also created the trigger too.



Appreciate your help.



Cheers,

Petula

[quote]
Trying to get it to work, but seems when I click on the "delete asset" link it just takes me to the %asset_url%? Does that mean my function didn't bind? I included the jquery.matrix.js file, and then just copied the code off your page… Also created the trigger too.

[/quote]



Well, how are you setting this up? %asset_url% is used in asset listings, is there where you are using it? If so, it should be getting replaced correctly when Matrix lists the assets. What are you using in your type format code?

I really think it would be beneficial to read the triggers manual. Paying close attention to URL matches condition.