Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Course assistants #278

Merged
merged 13 commits into from
Jun 24, 2015

Conversation

Termanty
Copy link
Contributor

No description provided.

</tbody>
</table>

<%= link_to 'Add a new assistant', new_organization_course_assistant_path(@course.organization, @course), class: "btn btn-mini btn-warning" %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could also be a embedded form?

@jamo
Copy link
Member

jamo commented Jun 16, 2015

This is a step towards adding more controllable permissions; though always adding more and more relations doesn't really scale.

However I consider this to be acceptable step towards goal of having more better control of permissions.
@mpartel do you have strong opinions regarding this step towards 'better permissions'?

@FeisEater
Copy link
Contributor

Fixed assistant? methods, should be doing only one SQL query

@@ -121,7 +121,7 @@ def save_deadlines
end

def enable
authorize! :teach, @organization
authorize! :teach, @organization # should assistants be able to enable/disable?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is probably not enough time in this project but ideally we'd have more fine-grained abilities and allow organization admins to delegate them selectively.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I notice @jamox already said above..

I agree, OK to leave for now but should definitely refactor if we ever want to develop permissions further.

</tr>
<% end %>
</tbody>
</table>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A list might suffice...

@jamo
Copy link
Member

jamo commented Jun 22, 2015

LGTM except for the few comments


<ul>
<% @assistants.each do |assistant| %>
<li><%= link_to assistant.username, participant_path(assistant) %></li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for myself: shouldn't this be login, not username...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, so the login is the field, but we have a hax alias for it. nice

…-assistants

Conflicts:
	app/models/ability.rb
	app/models/course.rb
	db/schema.rb
@FeisEater
Copy link
Contributor

Should be able to auto-merge, and tests should pass if internet is on

@jamo jamo merged commit 719a3c9 into testmycode:tmc-teacher-tools Jun 24, 2015
@jsopakar jsopakar deleted the course-assistants branch June 30, 2015 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants