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

limit task interaction to admins #72

Open
JonasJurczok opened this issue Oct 30, 2018 · 15 comments
Open

limit task interaction to admins #72

JonasJurczok opened this issue Oct 30, 2018 · 15 comments

Comments

@JonasJurczok
Copy link
Owner

As server admin
I would like to limit task interaction to certain users
So that not every troll can flood the system with BS tasks.

Acceptance Criteria:

  • It is possible to limit task interaction
  • Only people with the correct permissions can create/assign/edit/delete tasks

Original request here

@JonasJurczok
Copy link
Owner Author

@JonasJurczok
Copy link
Owner Author

@Tarrke Check the two links :)

@Tarrke
Copy link
Contributor

Tarrke commented Oct 30, 2018

Humm nice one!
Still have some points that are not clear, for example do qe have to make the UI to manage groups or is it already existing ? So some things to get right

@JonasJurczok
Copy link
Owner Author

As I understood it the UI is already there.
We have two options according to the API

Either we create our own role management (rather tricky)

Or we add a couple options that define group names.
If groups of that name exists then only players in that group can do the action.

The latter one should be rather straight forward.

@Tarrke
Copy link
Contributor

Tarrke commented Oct 30, 2018

Okay found the UI in question in MP or SP game open the console and hit

/permissions

Now I see things this should be simple yeah.

@Tarrke
Copy link
Contributor

Tarrke commented Oct 30, 2018

After some researche it does not seems possible to add new input_action rules. See https://forums.factorio.com/viewtopic.php?f=221&t=47308

We should be able to link the right to add/edit/assign tasks to an existing rule, but which one ???
List of defined onput_action here : https://lua-api.factorio.com/latest/defines.html#defines.input_action

@Tarrke
Copy link
Contributor

Tarrke commented Nov 13, 2018

I'm almost positive that the defines.input_action.add_permission_group may be used here.

@JonasJurczok
Copy link
Owner Author

Yep. But this just enables us to add new permission groups. Not permissions :)

@Tarrke
Copy link
Contributor

Tarrke commented Nov 14, 2018

We can add new permissions, but we can base the permission system in the mod on existing permissions. The OP asked for "only admins" functionnality, I think we can give the players with the add_permission_group permission to manage tasks. This is a workaround.

@JonasJurczok
Copy link
Owner Author

Yeah, that would work as well.

@Tarrke
Copy link
Contributor

Tarrke commented Nov 14, 2018

Should this be an option as well ?

@JonasJurczok
Copy link
Owner Author

JonasJurczok commented Nov 14, 2018 via email

@Tarrke
Copy link
Contributor

Tarrke commented Nov 14, 2018

I'll look into that next week

@JonasJurczok
Copy link
Owner Author

Okay just to recap, there are two ways of doing this.

  1. Bind the rights to the defines.input_action.add_permission_group permission
    Question:
    There are multiple permissions in this mod (create, edit, assign, complete, delete). How are they distinguished (you want completion of tasks for everyone but not creation?)

  2. Create a set of options (one per functionality).
    These options are free form text.
    If they are set it is checked if a group of that name exists.
    If a group exists it is checked if the user is in the group.
    If yes the action is performed.

@JonasJurczok
Copy link
Owner Author

As a side effect: would it make sense to have two levels of permissions? One for doing everything and one for only working with tasks assigned to yourself?

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

2 participants