Fixed a commenting hiccup in the orgs#show
Orgs#show won't display duplicate empoyees
Users should now be able to remove employees from orgs
This funcionality might not be perfect as yet, but I'll keep working on it.
It works alright for now.
Jobs should be authorized at #create
THis way I can authorize users according to what org/project they create
a new job on while new users would be able to access the form immediately
Forgot the update the policy
Big change to projects policy
New users should be able to go to the page, but then have to be
authorized to view projects for a specific organization
or even specific projects themselves. I'm not sure how I'll
implement the latter, but I'll figure it out.
Removed all authorization from projects for now
Same changes as projects policy
I also removed the fail from the remove_employee action
Updated polict for employees just liek the projects
Now new users should be able to access all pages right off the bat
Then I'll authorize them according to organization first, then project
Then job perhaps. THis will get confusing really fast...
Removed all authorization from jobs
Employees can now only see employees their authorized to
The authorization now checks the employee id of the page being viewed
And checks that the current user has the appropriate role
New users are automatically added to a new organization called 'Self'
This way the user can immediately create projects and jobs without having to create a legit organization
It allows people to keep personal projects private since this creates a NEW organization each time
Users can now only view organizations they belong to
This is useful cause before you could just go directly to the org link
And see it. Now that won't work
Users can now create projects for organizations...
...but only the ones their authorized to create projects for.
Removing employees from organizations through form works now
It redirects to the organizations path, but I'd prefer it to go back to the organization path
Redirecting to the organization path throws an error that I'm not sure how to fix just yet.
This works for right now
Updated the add employee form
It uses a route now like the remove employee link
It's a lot more attractive now, I think and works a litle better.
New users can now create projects for their own organization
Now I just need to figure out a way to authorize users to create jobs on
projects or organizations. Such confusion. Many headache. Shibe must coffee
Current user can add project to organization they just created