After installing the package, If I try to go to /admin , I get the message "you can not view this page because you are not admin " . However if I hit the back button, I do get to /admin and can see all my collections.
The logged in user has a role admin , as I can test it with :
{{#if isInRole 'admin' 'default-group'}}
I am admin........
{{/if}}
However the same block of code in {{#if isinRole 'admin'}} does not return True. in file yadmin/lib/client/html/admin_layouts.html.
Ignacy: Exactly, the current user which is an Admin user gets checked at the above location you pointed out. However not sure why the check fails and it goes to the else clause which prints the message.
in my mediert.start() section , I explicitly do the following to make sure the admin user is indeed set to admin :
if (user.name === "tom" ){
Roles.addUsersToRoles(id, 'admin', 'default-group')
Roles.addUsersToRoles(id, 'super-admin', Roles.GLOBAL_GROUP)
}
however still going to /admin , i do see the message and then once i press browser back botton , i do see the admin panel.
What do you mean by saying "create simple repo with repro " .
By the way. Do you know if there is a way to decrease the input field length so to have few fields all on the same line ?
Sorry, by create simple repo with repro I mean creating a simple project and uploading it to GitHub for others to investigate. Or describing a clear way to reproduce the error.
I do see admin warning sometimes even if I am an admin, but it disappears after a second and I'm redirected to admin panel.
I guess you should override the template - please look at the aldeed:autoform documentation.
After installing the package, If I try to go to /admin , I get the message "you can not view this page because you are not admin " . However if I hit the back button, I do get to /admin and can see all my collections.
The logged in user has a role admin , as I can test it with : {{#if isInRole 'admin' 'default-group'}}
I am admin........
{{/if}}
However the same block of code in {{#if isinRole 'admin'}} does not return True. in file yadmin/lib/client/html/admin_layouts.html.
{{#if AdminConfig}} {{#if isInRole 'admin'}}The roles package used has groups of roles - see the link to understand it.
The message "you're not an admin" is shown here. You can see the exact checks which are executed.
I never experienced such behavior. It would be great if you could create simple repo with repro. Here is very simple demo you can start with.
Ignacy: Exactly, the current user which is an Admin user gets checked at the above location you pointed out. However not sure why the check fails and it goes to the else clause which prints the message.
in my mediert.start() section , I explicitly do the following to make sure the admin user is indeed set to admin : if (user.name === "tom" ){ Roles.addUsersToRoles(id, 'admin', 'default-group') Roles.addUsersToRoles(id, 'super-admin', Roles.GLOBAL_GROUP) } however still going to /admin , i do see the message and then once i press browser back botton , i do see the admin panel.
What do you mean by saying "create simple repo with repro " .
By the way. Do you know if there is a way to decrease the input field length so to have few fields all on the same line ?
Sorry, by
create simple repo with repro
I mean creating a simple project and uploading it to GitHub for others to investigate. Or describing a clear way to reproduce the error.I do see
admin warning
sometimes even if I am an admin, but it disappears after a second and I'm redirected to admin panel.I guess you should override the template - please look at the
aldeed:autoform
documentation.