User control with PHP permissions

Asked

Viewed 606 times

1

Good people took a system developed in PHP with mysql database running and passed me the task of creating user profiles or a tool for the system administrator to put what he wants the user to see, in java we have Spring security for this task, someone knows a pleasant solution.

  • I developed a project, I used the Codeigniter framework, and I did all the user validation, according to the modules you are allowed... Perhaps it would be a good strategy to use this framework.

  • Ola Xará this framework is procedural or OO

  • Object Oriented, very good and renders the Forms well...

  • It would be a system for which segment?

  • I believe that I would have to redo the whole system that would be very expensive is not?

  • It depends... but you can adapt the idea within the system that you already have... What is the segment of it?

  • Simple CMS for page creation and image placement on the pages of the site, but they intend to put more functionality in the future

  • Use Laravel 4 or 5 :). It’s arguably one of the best PHP frameworks today :)

Show 4 more comments

1 answer

2


Develop the solution as follows: Have a table of modules... when registering the user, select which modules it has permission and save everything in an auxiliary table, then just retrieve the modules that are allowed for that website.

When logging in, log in to Session which are the modules of that user... and recover through foreach(), do not forget to put an if() Else() to check if the idUsuario = x has access to module x.

Doubts, the disposition.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.