First thing first, thank you for your reply !
That seems to be a nice idea but I’m facing some troubles.
I tried two way :
The first time I left files: sortable: true
in my blueprint and did this :
// site/config.php
c::set('roles', [
[
'id' => 'admin',
'name' => 'Admin',
'default' => true,
'panel' => true,
'permissions' => [
'*' => true,
'panel.file.sort' => function() {
if( $this->site()->language()->code() === 'fr' ) {
return true;
} else {
return false;
}
}
]
],
[
'id' => 'test',
'name' => 'Test',
'panel' => true,
'permissions' => [
'*' => true,
'panel.file.sort' => function() {
if( $this->site()->language()->code() === 'fr' ) {
return true;
} else {
return false;
}
}
]
]
]);
The second time I changed my bluprint for files: sortable: false
and did that :
// site/config.php
c::set('roles', [
[
'id' => 'admin',
'name' => 'Admin',
'default' => true,
'panel' => true,
'permissions' => [
'*' => true,
'panel.file.sort' => function() {
return $this->site()->language()->default();
}
]
],
[
'id' => 'test',
'name' => 'Test',
'panel' => true,
'permissions' => [
'*' => true,
'panel.file.sort' => function() {
return $this->site()->language()->default();
}
]
]
]);
Nothing happened. If files are sortable like said in the blueprint it’s true for all languages, and conversely.
I tested to put panel.page.update
instead of panel.file.sort
and that worked the two different times for the test role but not for the admin.