Skip to content

Commit

Permalink
Use pre-defined constant for UID validator
Browse files Browse the repository at this point in the history
We shouldn't have second definition of TRUENAS_IDMAP_DEFAULT_LOW.
  • Loading branch information
anodos325 committed Jun 28, 2024
1 parent 85812d9 commit 2672d82
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/middlewared/middlewared/api/base/types/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

from annotated_types import Ge, Le
from pydantic.functional_validators import AfterValidator
from middlewared.plugins.idmap_.idmap_constants import TRUENAS_IDMAP_DEFAULT_LOW
from typing_extensions import Annotated

__all__ = ["LocalUsername", "LocalUID"]

TRUENAS_IDMAP_DEFAULT_LOW = 90000001


def validate_local_username(val):
# see man 8 useradd, specifically the CAVEATS section
Expand Down

0 comments on commit 2672d82

Please sign in to comment.