The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once



UserSpice
Page permissions - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: Page permissions (/showthread.php?tid=575)



Page permissions - scott - 05-27-2017

Good Afternoon,
I am having some difficulty controlling access. If I have some custom pages, I put them public_html/users, then assign permissions in the dashboard under the pages tab.

If I have users of admin and customer, and I do not wish the customer to see a page called say, secret.PHP, I would put the page in public_html/users and make the page private and give access to admin and not the customer.
Am I right? I think I am going slightly mad.

I have the following at the top of each page:
Code:
<?php require_once 'init.php'; ?>
Code:
<?php require_once $abs_us_root.$us_url_root.'users/includes/header.php'; ?>
Code:
<?php require_once $abs_us_root.$us_url_root.'users/includes/navigation.php'; ?>
Does anyone have any idea where I am going wrong please?
Scott



Page permissions - scott - 05-27-2017

I have found that if you use a copy of users\blank_pages\userspice_blank.php in your users folder, it works a dream.

Not wishing to male a criticism, but it is difficult to find this stuff out. You have a really good system here that has some real potential, but when you can't get answers to problems from anywhere, it is a real grind trying to stick with it.

I understand how FOSS works, so i wouldn't dream of being an arse, i just think your software should go a long way.


Page permissions - Brandin - 05-27-2017

Scott,

Did you get this working?

The line you were missing for your reference is:
Code:
<?php if (!securePage($_SERVER['PHP_SELF'])){die();} ?>

Best of luck.


Page permissions - scott - 05-27-2017

Yes, I had just worked it out, boss.
Thanks.




Page permissions - mudmin - 05-29-2017

Yeah. I need help with updated documentation. It's a process. I work a "real" job and this is my busy system so there's kind of an ebb and flow to the project.

Thanks for the feedback.