mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
Updated passwd plugins module to where it can at least be imported
This commit is contained in:
parent
64c072b7b3
commit
ec86208a90
@ -874,7 +874,7 @@ import plugable
|
||||
from backend import Backend, Context
|
||||
from frontend import Command, LocalOrRemote, Application
|
||||
from frontend import Object, Method, Property
|
||||
from parameters import DefaultFrom, Bool, Flag, Int, Float, Bytes, Str
|
||||
from parameters import DefaultFrom, Bool, Flag, Int, Float, Bytes, Str, Password
|
||||
|
||||
|
||||
def create_api(mode='dummy'):
|
||||
|
@ -892,6 +892,12 @@ class Str(Data):
|
||||
)
|
||||
|
||||
|
||||
class Password(Str):
|
||||
"""
|
||||
A parameter for passwords (stored in the ``unicode`` type).
|
||||
"""
|
||||
|
||||
|
||||
def create_param(spec):
|
||||
"""
|
||||
Create an `Str` instance from the shorthand ``spec``.
|
||||
|
@ -23,7 +23,7 @@ Frontend plugins for group (Identity).
|
||||
|
||||
from ipalib import api, crud, errors
|
||||
from ipalib import Object, Command # Plugin base classes
|
||||
from ipalib import Str, Int # Parameter types
|
||||
from ipalib import Str, Int # Parameter types
|
||||
|
||||
|
||||
def get_members(members):
|
||||
|
@ -21,23 +21,21 @@
|
||||
Frontend plugins for password changes.
|
||||
"""
|
||||
|
||||
from ipalib import frontend
|
||||
from ipalib.frontend import Param
|
||||
from ipalib import api
|
||||
from ipalib import errors
|
||||
from ipalib import ipa_types
|
||||
from ipalib import util
|
||||
from ipalib import api, errors, util
|
||||
from ipalib import Command # Plugin base classes
|
||||
from ipalib import Str, Password # Parameter types
|
||||
|
||||
class passwd(frontend.Command):
|
||||
|
||||
class passwd(Command):
|
||||
'Edit existing password policy.'
|
||||
|
||||
takes_args = (
|
||||
Param('principal',
|
||||
Str('principal',
|
||||
cli_name='user',
|
||||
primary_key=True,
|
||||
default_from=util.get_current_principal,
|
||||
),
|
||||
Param('password', flags=['password']),
|
||||
Password('password'),
|
||||
)
|
||||
|
||||
def execute(self, principal, password):
|
||||
|
Loading…
Reference in New Issue
Block a user