The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New found pages as private pages
#1
When adding new pages they are public by default. Is it possible to make them private by default?

  Reply
#2
Run this query

ALTER TABLE
Code:
pages
CHANGE
Code:
private
Code:
private
INT(11) NOT NULL DEFAULT '1';
  Reply
#3
That solved it. Thank you!
  Reply
#4
@Mudmin - I'd like to deploy this as an option on admin_pages.php - thoughts?
  Reply
#5
Yeah. We had that before. I think that's the way to go. My thought is to put it in the securePage function so the first time ANYONE notices the page, it becomes private...this way you never have to even visit the admin_pages thing to fire off that query.
  Reply
#6
So offer an option, from the settings table, and whatever the value is in this settings table is the value we use in the securePage function? (1 = private, 0 = public - we can copy this for the setting)
  Reply
#7
Yeah. That's a great idea. And then it will be a both/and thing, where that will fire off whether it is hit from the securePage function or the admin_pages.
  Reply
#8
I will deploy this when we get Status 15 pushed.
  Reply
#9
OK! I remember the discussion on this...

The annoyance is there on purpose. I think it makes a ton of sense to just mark a page private by default (although I would be down with the option in the admin panel).

But, I took the private page when securePage hit the page the first time, because I kept forgetting to go into the admin panel and set permissions on pages because they were all admin only by default.

I probably didn't explain that properly. There isn't a technical reason why someone needs to go into admin_pages to add a page. The reason that message is there is to force the developer to think through permissions a page at a time when they create them. Although, it definitely happens where I add a permission level so I forget to click the private button.

I went ahead and made it 1 by default and then you can feel free to add it as an option to the admin panel. I'll push soon.
  Reply
#10
1 by default is fine with me - because truly who wants a page they're developing public by default??

However - you run into issues of when you are pushing new pages during maintenance. I think a developer option for this should be put into place - just for this reason: we try to give US developers as many options as possible, with as little confusion, so if the option is there, they don't have run the query themselves, or change the DB themselves type stuff.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)