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

User roles. #1

Open
emanuele-falzone opened this issue May 22, 2022 · 1 comment
Open

User roles. #1

emanuele-falzone opened this issue May 22, 2022 · 1 comment

Comments

@emanuele-falzone
Copy link
Owner

emanuele-falzone commented May 22, 2022

The project is built, as for now, forgetting about permissions.
I forgot about user permissions, which is fine, but the system does not distinguish between user roles.

The application should be modified, taking into account the user roles.
The following example will clarify the expected behavior.

Consider get_redirection_location.feature. I describe the scenario from a visitor point of view in this feature.
However, we can also analyze the same scenario from the administrator point of view.

Both of them are interested in knowing the location associated with a given key, but their goals are different:
the visitor is only interested in navigating to the redirection location, while the administrator may be interested in getting the location only for inspection purposes.

The difference is subtle but important since it changes how the system should behave. As an administrator, I do not want the redirection counter to be incremented if we are only getting the location for inspection purposes.

@emanuele-falzone
Copy link
Owner Author

A feature preview in Gherkin could be

Feature: Inspect short link location
    As an administrator
    I want to know the location of a short link
    So that I can decide if the link is still useful

    Scenario: Inspect a previously created short URL
        Given that I got a short link for http://www.google.com
        When I inspect the short link
        Then the system returns the location http://www.google.com
    
    Scenario: Inspect a short URL that does not exist
        Given that I got a short link that does not exist
        When I inspect the short link
        Then the system signals that the short link does not exist

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

No branches or pull requests

1 participant