Recent Topics

1 Oct 25, 2018 18:47    

I'm looking over the codebase. I've got a few questions that I can't seem to figure out.

In the app, in the b2evolution/inc/_core/__core.init.php, there's a func

function build_evobar_menu()
.
.
$perm_admin_normal = $current_User->check_perm( 'admin', 'normal' );

It's obvious -- check_perm is checking "something" for the admin group for "normal" access..
(or so I'm assuming).

I'm trying to figure out exactly what gets "set" and when/were the "thing" is that gets set. Is it something in the db/tbls... I did a search across the entirety of the db/tbl schema and can't seem to find anything..

I did a complete check across the codebase.. I do find a func within the

In the app, in the b2evolution/inc/_core/__core.init.php, there's a func
function get_available_group_permissions( $grp_ID = NULL )

that has a section of logic that might seem to set the attributes -- but I'm not sure::
$perm_adminvalues = array(
'label' => T
( 'Evobar & Back-office' ),
'user_func' => 'check_admin_user_perm',
'group_func' => 'check_admin_group_perm',
'perm_block' => 'core_evobar',
'options' => array(
array( 'notoolbar', T( 'No Toolbar' ) ),
array( 'none', T( 'No Back-office Access' ) ),
array( 'restricted', T
( 'Restricted Back-office Access' ) ),
array( 'normal', T_( 'Normal Back-office Access' ) ) ),
'perm_type' => 'radiobox',
'field_lines' => true,

I'm really trying to track down/understand the logic, so I can add an additional group, to then generate an additional "set" of items in the EVO-toolbar (menu1) instead of the menu generated for the admin group...

If someone could help me understand, or point me to any docs that would illustrate how this fits/flows, it could help a great deal.

Once I get a better understanding of the flow/layout, I can get a better understanding of what's involved with what I'm looking for, as well as a better understanding of how to modify the app.

thanks

-bruce

2 Nov 02, 2018 19:44

There are different types of permissions: some belong to a user group, some belong to a usercollection and some belong to a usergroupcollection.

Depending on the permissions name (eg admin) the underlying permission will be fetched in different places.

The best what to understand the logic is to drill down into the User::check_perm() function and follow the logic there.


Form is loading...