question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

User restrictions

See original GitHub issue

From an admin perspective it may sometimes be useful to support restrictions on user resource usage. A few examples:

  • Maximum number of workers per user
  • Maximum resources per user
  • Maximum number of clusters per user

We should probably provide a common metrics, but will likely also need a generic hook for operations an admin may want to restrict. This may look like:

def can_start_cluster(user):
    """Check if a user can start a cluster.
    
    Returns
    -------
    allowed : bool
        True if the user can start a cluster, False otherwise
    msg : str or None
        A user-facing message explaining why the operation is currently forbidden.
    """
    pass

def can_start_worker(user, cluster):
    """Check if a user can start a worker.
    
    Returns
    -------
    allowed : bool
        True if the user can start a worker, False otherwise
    msg : str or None
        A user-facing message explaining why the operation is currently forbidden.
    """
    pass

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
ericdillcommented, Sep 16, 2019

I agree that group-level restriction sets would be what we’d want if we supported anything other than uniform restrictions.

As long we don’t engineer ourselves into a corner with respect to this at some point in the future, I’d suggest punting on it for now

1reaction
martindurantcommented, Sep 16, 2019

This is a massive improvement in the usefulness of Gateway, wholly in favour! I can perhaps help. I agree with erring for situation 1. . For 2. it is indeed tricky, I think I favour an error still (“please try again later”!), but obviously autoscaling needs to know that scaling can fail.

To @ericdill 's comment: can_start_worker, etc., would be pluggable, and the org can implement how they make this decision themselves?

Read more comments on GitHub >

github_iconTop Results From Across the Web

User restrictions | Drupal.org
User restrictions blocks users from registering or logging in based on name or email masks making it useful for fighting spam accounts.
Read more >
User Access Restriction Model
User access restrictions control access to functionality on various levels: They determine which functions users may access. This covers the access of UI...
Read more >
How to configure restrictions on a user account in Windows 10?
Hi,. I want to configure restrictions on a user account in Windows 10 as following. The user shouldn't be able to install and...
Read more >
What's the difference between Restrictions and User ...
A restriction limits the sales information a user is able to see, such as all the sales for a specific branch or rep...
Read more >
End User Restrictions Definition | Law Insider
End User Restrictions means those restrictions listed on Exhibit C. Sample 1. Based on 1 documents. 1.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found