forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: philippefx on August 13, 2010, 11:13:12 am

Title: create a "generic" profile without permission to change the user profile
Post by: philippefx on August 13, 2010, 11:13:12 am
Hi,

We have "guest"-like profile for a group of people. We don't want them to change the password, name, etc.

And we also would like to suppress the sidebar menu for this guest.

What's the best way to do this ?


Thank you,

Philippe
Title: Re: create a "generic" profile without permission to change the user profile
Post by: papukaija on August 15, 2010, 09:52:42 pm
We have "guest"-like profile for a group of people. We don't want them to change the password, name, etc.
Please look at group manager (groupmgr.php).

And we also would like to suppress the sidebar menu for this guest.
Board rules / Forum policies: One Question per Thread (http://forum.coppermine-gallery.net/index.php/topic,55415.msg270618.html#msg270618) This rule is very strict. Btw, the answer to this question can be found from the docs (http://documentation.coppermine-gallery.net/en/).
Title: Re: create a "generic" profile without permission to change the user profile
Post by: philippefx on August 16, 2010, 11:45:37 am

Please look at group manager (groupmgr.php).

So an answer could be "It can't be done with a config setting and you have to edit/change the code" ?


Board rules / Forum policies: One Question per Thread (http://forum.coppermine-gallery.net/index.php/topic,55415.msg270618.html#msg270618) This rule is very strict. Btw, the answer to this question can be found from the docs (http://documentation.coppermine-gallery.net/en/).

It was the same question/subject for me, "permission to change the user profile", I didn't know this is a separate settings. Sorry.

Anyway thanks for your answer, I found the solution (admin menu -> theme).


Greetings,
Philippe


Title: Re: create a "generic" profile without permission to change the user profile
Post by: papukaija on August 16, 2010, 05:35:14 pm
So an answer could be "It can't be done with a config setting and you have to edit/change the code" ?

No, but I'll explain what I meant if you post a link to your gallery (http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616) as requested by board rules (don't expect clear answers,or answers at all, if you don't follow board rules). Btw, groupmgr.php isn't the only place to control user's permissions.
Title: Re: create a "generic" profile without permission to change the user profile
Post by: philippefx on August 17, 2010, 09:33:53 am
No, but I'll explain what I meant if you post a link to your gallery (http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616) as requested by board rules (don't expect clear answers,or answers at all, if you don't follow board rules). Btw, groupmgr.php isn't the only place to control user's permissions.

Yes it's my gallery : http://photo.grangeneuve.ch/,

You may try this user / passwd : test / testforum


Thank you.
Title: Re: create a "generic" profile without permission to change the user profile
Post by: papukaija on August 17, 2010, 10:06:20 pm
Ok, there are few places where you can control guest's permissions (login to your gallery as admin first):

- For global group permions (http://documentation.coppermine-gallery.net/en/groups.htm#groups), go to http://photo.grangeneuve.ch/groupmgr.php
- To controll registration (http://documentation.coppermine-gallery.net/en/configuration.htm#admin_registration) and things that users can do with their profile (http://documentation.coppermine-gallery.net/en/configuration.htm#admin_user),etc : http://photo.grangeneuve.ch/admin.php
- There are also album specific settings (http://documentation.coppermine-gallery.net/en/albums.htm#album_prop); a "properties" link is at the front page, near the album's name.
Title: Re: create a "generic" profile without permission to change the user profile
Post by: philippefx on August 18, 2010, 02:37:35 pm
Ok, there are few places where you can control guest's permissions (login to your gallery as admin first):

- For global group permions (http://documentation.coppermine-gallery.net/en/groups.htm#groups), go to http://photo.grangeneuve.ch/groupmgr.php
- To controll registration (http://documentation.coppermine-gallery.net/en/configuration.htm#admin_registration) and things that users can do with their profile (http://documentation.coppermine-gallery.net/en/configuration.htm#admin_user),etc : http://photo.grangeneuve.ch/admin.php
- There are also album specific settings (http://documentation.coppermine-gallery.net/en/albums.htm#album_prop); a "properties" link is at the front page, near the album's name.

Thank you for your answer, but you didn't read the question did you ? Or I didn't understand your answer. I already checked all options and no one can help me, or I missed something.

If I create any account, the user *can* change his own password. I would like to avoid this. How can I do that ?


Thanks for any help,
Title: Re: create a "generic" profile without permission to change the user profile
Post by: Nibbler on August 18, 2010, 08:40:27 pm
You can only do that by modifying the code. A fairly crude method would be to change

Code: [Select]
case 'change_pass' :

    if (!USER_ID) {
        cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
    }

to

Code: [Select]
case 'change_pass' :

    if (!GALLERY_ADMIN_MODE) {
        cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
    }

in your profile.php
Title: Re: create a "generic" profile without permission to change the user profile
Post by: philippefx on August 19, 2010, 11:48:20 am
You can only do that by modifying the code. A fairly crude method would be to change

Code: [Select]
case 'change_pass' :

    if (!GALLERY_ADMIN_MODE) { /* was : if (!USER_ID) { */
        cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
    }

in your profile.php

It's not a beautifull piece of code but we don't need more :)

=> Nice. Many thanks.
Title: Re: create a "generic" profile without permission to change the user profile
Post by: Αndré on September 02, 2010, 04:02:08 pm
Of course you can restrict it to just that user by entering the user id:
Code: [Select]
case 'change_pass' :

    if (!USER_ID || USER_ID == 42) {
        cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
    }
Title: Re: create a "generic" profile without permission to change the user profile
Post by: philippefx on September 03, 2010, 02:08:59 pm
Of course you can restrict it to just that user by entering the user id:
Code: [Select]
case 'change_pass' :

    if (!USER_ID || USER_ID == 42) {
        cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
    }

Perfect, perfect !


With love and gratitude :)

Philippe