login with users, groups and permissions

OK, I have a set of tables that I want to use for my user logins. I am guessing that I need a separate model for each table in the database. My tables are as follows:

Users - user information such as first and last name, groups_id, status, etc...

groups - defines the user groups with id, name, description

permissions - defines a list of permissions that a group can have

permission_assignments - groups_id and permissions_id. many to many relationship table

I am not sure how to go about populating an array that would contain the list of permissions that a user would have based on the group they are in after a successful login. Basically, a user belongs to a group, and the group gets assigned permissions. I want to then be able to validate functions/methods based on weather the logged in user has certain permissions.

Any help is appreciated