Closed quasiperfect closed 9 years ago
I have no official code for list of the available modules. Anyway, there is code showing how this could be done, see Events::_scan_modules() and Events::_scan_common_modules().
Maybe something like get_instance()->_scan_modules() is what you need, you may suggest something convenient.
About the second question - I am not sure that I get it. Could you rephrase/describe it?
Maybe something like this would be convenient:
$dirs = $this->_module_dirs('application');
$dirs = $this->_module_dirs('common');
$dirs = $this->_module_dirs('all'); // default
I could do some implementation. If you have a good and convenient for you idea, a PR from you is welcome. :-)
I think these additional methods could be placed within MX_Controller.
About the second question: search your project for 'user_authorization_check_at_login' and maybe you will get some idea for your case. This is a callable that may be redefined in different ways in front/end.
Basically, you may define one or more base controllers that customize access based on user permissions.
thanks so much for your time
i can write my own code no problem i'm not sure is good enough to be included and i have to learn git to do a PR
i will expand on my second question
i have a manager application with some base modules i build additional modules that some people may need or not the modules are activated on copy i have a users table and a rights table when i add a new module the user interface will add 4 more checkboxes view,add,modify,delete i hope you get the idea if you have a better one i always appreciate your input
OK, forget about the first topic.
I have only an authentication feature (with "Remember me" option) that in a latent form is pushed within the repository. At the moment I have no a system for managing roles and rights. I got the idea and rewrote code from this project: https://github.com/donjakobo/A3M . The project attracted my attention, because it provides support for external authentication sources. But still a lot is to be done there IMO.
There is a branch ci-beta https://github.com/donjakobo/A3M/tree/ci3-beta
This project has roles and rights feature, at least you can get the structure of the database tables. Maybe you should rewrite/update code, the "pure CodeIgniter" oriented style is not comfortable enough, IMO.
I can't say for sure, I think for the next year to create and publish something like the A3M project in my platform. At the moment I have no a ready and tested solution to propose.
From A3M I got only managing authentication, the other things are for the next year. Some screenshots:
Here there are some suggestions of mine to A3M project: https://github.com/donjakobo/A3M/issues/102 I will have these ideas implemented at the next year in my platform. If I have the time, I would help there.
thanks so much for your feedback i will adapt your ideas and the A3M project for my needs we use the same thing for building admin modules sb-admin-2 if you don't mind what font size you used ? the icon font looks good or maybe you use svg sprites ?
Yes, sb-admin2, I did not modify any font sizes as far as I remember. The icons are from Font Awesome, they are included in this starter project.
ok thanks
hi
is there a way to get all available modules or i have to parse the directory structure i ask because i don't want to redo a parsing if the framework is already doing that
any if you are kind enough to offer a suggestion how would you implement a acl for a unknown number of modules