Skip to content

Stock Item Ownership on items with no owner #7446

Closed

Description

@SergeoLacruz

Body of the issue

I think we have a mismatch here. the documentation says:
tb1
but

def check_ownership(self, user):

returns True in that case. In my setup I need to add am owner to all stock items to avoid the editing possibility. Which one is the
intended behavior? I can change either doc or code.

Activity

  1. added
    triage:not-checked
    on Jun 15, 2024
  2. SchrodingersGat commented on Jun 16, 2024

    @SchrodingersGat
    Member

    The "stock ownership" permission functionality probably needs a larger scale review. I do not use this feature myself and am unsure how it is being used in practice.

    Any changes to the check_ownership method (and similar methods) will result in some far-reaching consequences so we need to carefully consider it.

    It sounds like you do use this feature? Can you provide some context on what changes you would like to see here, and your motivations?

  3. SergeoLacruz commented on Jun 16, 2024

    @SergeoLacruz
    ContributorAuthor

    There is no need to change the code. There is just a mismatch with the documentation. Changing the doc is fine.
    We do not use the feature yet but plan it for the following use case:
    Normal developers have view access to all parts and stock items. However populated boards are a special case.
    They have serial numbers and the developers need write access because they need to add remarks to the notes field like
    "repaired. replaces U343". They need to add pictures and error reports.
    Anyhow they should not have write access to other components.
    With the existing system I can create a user group for a project. I add all developers who are working on the project to
    that group and set the owner of all populated boards related to that project to the group.
    Additional I add a dummy owner to anything else. This is needed remove the editing feature.

    I know the stock ownership feature is a hack that just hides certain buttons. It is not ideal but OK for the moment.

    In an ideal case each stock item has its own access rules, user groups are related to projects, handling of
    beta testers, ...... long wish list :-)

  4. SchrodingersGat commented on Jun 16, 2024

    @SchrodingersGat
    Member

    @SergeoLacruz if you want to submit a PR to adjust the documentation accordingly, I'd support that!

  5. matmair commented on Jun 17, 2024

    @matmair
    Member

    A general refactor of the permissions would certainly be interesting... maybe we should create an epic collecting all issues regarding that and defining the user stories we want to have considered

  6. SchrodingersGat commented on Jun 17, 2024

    @SchrodingersGat
    Member

    Yep, I think an epic would be a good idea. I've got no horse in this race but would be interested to see how the feature is being used.

  7. SergeoLacruz commented on Jun 19, 2024

    @SergeoLacruz
    ContributorAuthor

    I think we can close this because the docs have been aligned with #7474

  8. removed
    triage:not-checked
    on Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions