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: Guest user as "Only viewer"  (Read 11809 times)

0 Members and 1 Guest are viewing this topic.

FrA1l3

  • Translator
  • Coppermine regular visitor
  • **
  • Country: es
  • Offline Offline
  • Posts: 78
    • ACMSB
Guest user as "Only viewer"
« on: March 26, 2018, 12:40:08 pm »

Hello,

I open this thread because I just did not find the correct configuration to have a user with "display only" permissions.
A user who can not create / manage albums can not edit their own profile but can see all public images and albums.

To carry out this task I had to put this code as a temporary solution
Code: [Select]
<?php 
if (! GALLERY_ADMIN_MODE) {
cpg_die (ERROR, $ lang_errors ['access_denied'], __FILE____LINE__);
?>


Certainly it is not the solution, but after playing with the groups / users I have not found another effective way to make it so.
I had to include it in the files

profile.php
albmgr.php

I tried to disable at the menu level the crossed out icons of the attachment, but the arrangement does not work well to me and what limited only with the solution of the code.

Is there any way to have a user only viewer? That is not able to create / manage albums or upload files or modify their profile?

Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Guest user as "Only viewer"
« Reply #1 on: March 26, 2018, 05:29:17 pm »

You can modify your theme to not provide 'Guests' with buttons for uploading, albums or profile.

Example:
Code: [Select]
   if ($USER_DATA['group_id'] != 3) addbutton($sys_menu_buttons,'{UPL_PIC_LNK}','{UPL_PIC_TITLE}','{UPL_PIC_TGT}','upload_pic'........
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Guest user as "Only viewer"
« Reply #2 on: March 26, 2018, 08:15:55 pm »

I spent some time looking at how to achieve what you want.

I think you should not use the 'Guest' group for your purpose. Using the Curve Theme, I turned off allowing uploads, etc for the 'Registered' group, and as a result there was no 'My gallery', 'Upload file' or 'Profile' menu items. Create another group, say 'Viewers', and try to disable its rights to see if you can achieve what you're looking for.

Also, perhaps it is your theme that may be causing your issues. Try one of the CPG 1.6 included themes.
Logged

FrA1l3

  • Translator
  • Coppermine regular visitor
  • **
  • Country: es
  • Offline Offline
  • Posts: 78
    • ACMSB
Re: Guest user as "Only viewer"
« Reply #3 on: April 19, 2018, 01:00:09 pm »

Hello

Sorry for the delay in responding, thank you very much for the help.
First of all I say that I use the old curve theme, of the 1.5.x versions with some slight mod.

I will try to make the changes that you indicate and I tell you the result, again thank you very much!
Logged

FrA1l3

  • Translator
  • Coppermine regular visitor
  • **
  • Country: es
  • Offline Offline
  • Posts: 78
    • ACMSB
Re: Guest user as "Only viewer"
« Reply #4 on: May 21, 2018, 01:13:02 pm »

Sorry for the delay.
Finally the solution has been to create the group "viewers" with the options that you have indicated and indeed the menus no longer appear.
I was wrong and the group "registered" has more permissions even if it was configured identical.

thank you for your support @ron4mac!  :)
Logged
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 20 queries.