WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.8 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.13.x) »
  • General Help & Support »
  • 2.13.6. permissions
  • Print
Pages: [1]   Go Down

Author Topic: 2.13.6. permissions  (Read 11138 times)

Offline crnogorac081

  • Posts: 2163
  • Gender: Male
2.13.6. permissions
« on: February 26, 2025, 10:16:17 AM »
Hello,

I noticed some new permissions: admin, admin_basic, admin_advanced

I couldnt find out where are they used, does anyone know ? Is there an intention to use this for ajax requests (my intention to use it for this)?
Logged
Web developer

Offline sternchen8875

  • Global Moderator
  • *****
  • Posts: 609
Re: 2.13.6. permissions
« Reply #1 on: February 26, 2025, 10:48:47 AM »
Dietmar's last secret.....

these 3 permissions are not in use yet. i remember, that it was planned, to build a new permission handling, but no details
Logged

Offline crnogorac081

  • Posts: 2163
  • Gender: Male
Re: 2.13.6. permissions
« Reply #2 on: March 06, 2025, 12:54:05 PM »
another "dumb" question, if page is in root, parent = 0, what is root parent ?


If page_id = 123 , parent = 0, root_parent = 0 or is it 123 ? Because i see cases in phpmyadmin where for one page both root_parent and parent are 0, and other page is parent = 0, root_parent is its own page_id.

What is the correct way ?
Logged
Web developer

Offline sternchen8875

  • Global Moderator
  • *****
  • Posts: 609
Re: 2.13.6. permissions
« Reply #3 on: March 06, 2025, 01:03:27 PM »
Quote
If page_id = 123 , parent = 0, root_parent = 0 or is it 123 ? Because i see cases in phpmyadmin where for one page both root_parent and parent are 0, and other page is parent = 0, root_parent is its own page_id.

in level == 0, root_parent is == page_id from this page, if its has own page_content.
pages with page_type == menu-link has the root_parent == 0, because, it has no content, only a redirect
Logged

Offline crnogorac081

  • Posts: 2163
  • Gender: Male
Re: 2.13.6. permissions
« Reply #4 on: March 06, 2025, 01:50:22 PM »
tnx, I thought its a bug, because I see there is content - look at the seccond page from top.



could it be that page is created as menu_link, then deleted menu_link and replaced with wysiwyg...

What is this page_root used for ?
« Last Edit: March 06, 2025, 01:58:34 PM by crnogorac081 »
Logged
Web developer

Offline sternchen8875

  • Global Moderator
  • *****
  • Posts: 609
Re: 2.13.6. permissions
« Reply #5 on: March 06, 2025, 03:30:46 PM »
A root_parent is primarily used to create the page and menu structure. It is always the topmost element in the root for the respective branch at level == 0

The technical part then becomes somewhat confusing
The database field root_parent has a default value of 0
If a page is created, this field is not used and remains (briefly) at zero. Subsequently, the root_parent is determined using the parent of the new page transmitted in the form. This is done by MySQL queries of level and parent.
- If the level of the parent == 0, the Root_Parent of the new page is its page ID.
- If the level == 1, the Root_Parent == is the parent of the new page.
- If the level is not 0, the search continues via the pageTrail until the parent == 0.
- If no result is obtained, the Root_Parent remains at 0

Quote
pages with page_type == menu-link has the root_parent == 0, because, it has no content, only a redirect

forget this, it was not correct   :oops:

Quote
could it be that page is created as menu_link, then deleted menu_link and replaced with wysiwyg...
If we assume normal practice, a page with a menu link section cannot have any other sections, but it would of course be possible to create a new page with a different section type and move the child page of the menu link to this new page. This happens to me quite often because I often forget to select the menu link

Quote
I thought its a bug, because I see there is content - look at the seccond page from top.

i cannot say: NO, THERE IS NO BUG
Within the WB page overview there is the SectionList here



This icon is deactivated in the overview for menu links. I would look here in the database, especially with the page ID in the sections table. If a page has a section == Menu-Link, no further sections may exist, Menu-Link is a pure redirection via header(Location), a further text output by another section would lead to a fatal error


Logged

Offline crnogorac081

  • Posts: 2163
  • Gender: Male
Re: 2.13.6. permissions
« Reply #6 on: March 07, 2025, 09:59:14 AM »
So if I understood this correctly root parent is always a page ID number, with an exception if page is only many link section, the root patent Is 0
Logged
Web developer

Offline sternchen8875

  • Global Moderator
  • *****
  • Posts: 609
Re: 2.13.6. permissions
« Reply #7 on: March 08, 2025, 12:09:36 AM »
Quote
with an exception if page is only many link section, the root patent Is 0

no, see my last answer, this was wrong, sorry.

The conditions once again
- If the level of the parent == 0, the Root_Parent of the new page is its page ID.
- If the level == 1, the Root_Parent == is the parent of the new page.
- If the level is not 0, the search continues via the pageTrail until the parent == 0.
- If no result is obtained, the Root_Parent remains at 0

The last two options are checked when editing the page properties and set to 0 if parent and level are also zero
The root_parent is required when creating menus, especially for menus in multilingual pages, to determine the starting point of a language branch


Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.13.x) »
  • General Help & Support »
  • 2.13.6. permissions
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2