Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: create a "generic" profile without permission to change the user profile  (Read 7556 times)

0 Members and 1 Guest are viewing this topic.

philippefx

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28

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
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333

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 This rule is very strict. Btw, the answer to this question can be found from the docs.
Logged

philippefx

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28


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 This rule is very strict. Btw, the answer to this question can be found from the docs.

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


Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333

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 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.
Logged

philippefx

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28

No, but I'll explain what I meant if you post a link to your gallery 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.
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333

Ok, there are few places where you can control guest's permissions (login to your gallery as admin first):

- For global group permions, go to http://photo.grangeneuve.ch/groupmgr.php
- To controll registration and things that users can do with their profile,etc : http://photo.grangeneuve.ch/admin.php
- There are also album specific settings; a "properties" link is at the front page, near the album's name.
Logged

philippefx

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28

Ok, there are few places where you can control guest's permissions (login to your gallery as admin first):

- For global group permions, go to http://photo.grangeneuve.ch/groupmgr.php
- To controll registration and things that users can do with their profile,etc : http://photo.grangeneuve.ch/admin.php
- There are also album specific settings; 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,
Logged

Nibbler

  • Guest

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
Logged

philippefx

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: create a "generic" profile without permission to change the user profile
« Reply #9 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__);
    }
Logged

philippefx

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: create a "generic" profile without permission to change the user profile
« Reply #10 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
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 20 queries.