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

Feature: Renting manager role #916

Open
wants to merge 11 commits into
base: staging
Choose a base branch
from
Open

Conversation

Ellen-Wittingen
Copy link
Contributor

@Ellen-Wittingen Ellen-Wittingen commented Mar 18, 2024

Added a role for renting managers with which they have the following permissions:

  • Activities
    • See a list of all activities, also the ones that are locked
    • Create, edit, and delete activities
    • View an activity, including the tabs "Samenvatting", "Bestellingen", and "Producttotalen"
    • Access the order screen and place orders with it, but credit mutations (Geld inleggen)
  • Invoices
    • See a list of all invoices
    • View an invoice, but not edit or send it
  • Pricelists
    • See a list of all unarchived pricelists and the prices for each product, but not edit
  • Users
    • See a list of all manually added users, but not from AMBER except for themselves
    • View a manually added user and their credit, orders, and credit mutations

The following permissions were changed for main bartenders (after talking to Soccie):

  • Activities: In the activity view, only the tabs "Samenvatting" and "Producttotalen" can be viewed now.

I also added tests for the new renting-manager role and added some tests that were missing for some controllers. The syntax used is a bit inconsistent across tests (also in the already existing tests), I will fix this in some another pull request in the future.

To easily log in as the different roles, I added new users to the seeding of AMBER-API which are linked to SOFIA roles in the seeding of SOFIA, see #412

@Ellen-Wittingen Ellen-Wittingen marked this pull request as ready for review March 18, 2024 16:14
@@ -63,7 +63,7 @@
</tbody>
</table>

<% unless @invoice.paid? %>
<% unless !policy(Invoice).send_invoice? || @invoice.paid? %>

Choose a reason for hiding this comment

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

What does this mean?
and why is the change needed?

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.

None yet

2 participants