mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-22 17:34:21 +01:00
adding skeleton to handle form attributes
This commit is contained in:
parent
43299cb52f
commit
67b6c27273
90
conf/attributes.yml
Normal file
90
conf/attributes.yml
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
last-name:
|
||||||
|
description: "Last Name of the user"
|
||||||
|
display_name: "Last Name"
|
||||||
|
backend-attributes:
|
||||||
|
ldap: cn
|
||||||
|
ad: CN
|
||||||
|
|
||||||
|
first-name:
|
||||||
|
description: "First name of the user"
|
||||||
|
display_name: "Name"
|
||||||
|
backend-attributes:
|
||||||
|
ldap: sn
|
||||||
|
ad: sn
|
||||||
|
email:
|
||||||
|
description: "Email of the user"
|
||||||
|
display_name: "Name"
|
||||||
|
autofill:
|
||||||
|
function: email
|
||||||
|
args:
|
||||||
|
- $first-name
|
||||||
|
- $last-name
|
||||||
|
- @example.com
|
||||||
|
backend-attributes:
|
||||||
|
ldap: cn
|
||||||
|
ad: CN
|
||||||
|
uid:
|
||||||
|
description: "UID of the user"
|
||||||
|
display_name: "UID"
|
||||||
|
autofill:
|
||||||
|
function: uid
|
||||||
|
args:
|
||||||
|
- $first-name
|
||||||
|
- $last-name
|
||||||
|
backend-attributes:
|
||||||
|
ldap: uid
|
||||||
|
ad: UID
|
||||||
|
|
||||||
|
uidNumber:
|
||||||
|
description: "User ID Number of the user"
|
||||||
|
display_name: "UID Number"
|
||||||
|
autofill:
|
||||||
|
function: uidNumber
|
||||||
|
args:
|
||||||
|
- $first-name
|
||||||
|
- $last-name
|
||||||
|
backend-attributes:
|
||||||
|
ldap: uidNumber
|
||||||
|
ad: UIDNumber
|
||||||
|
|
||||||
|
gidNumber:
|
||||||
|
description: "Group ID Number of the user"
|
||||||
|
display_name: "GID Number"
|
||||||
|
autofill:
|
||||||
|
function: uidNumber
|
||||||
|
args:
|
||||||
|
- $first-name
|
||||||
|
- $last-name
|
||||||
|
backend-attributes:
|
||||||
|
ldap: gidNumber
|
||||||
|
ad: GIDNumber
|
||||||
|
|
||||||
|
shell:
|
||||||
|
description: "Shell of the user"
|
||||||
|
display_name: "Shell"
|
||||||
|
self: true
|
||||||
|
default: /bin/bash
|
||||||
|
backend-attributes:
|
||||||
|
ldap: shell
|
||||||
|
ad: SHELL
|
||||||
|
|
||||||
|
home:
|
||||||
|
description: "Shell of the user"
|
||||||
|
display_name: "Shell"
|
||||||
|
autofill:
|
||||||
|
function: home
|
||||||
|
args:
|
||||||
|
- $first-name
|
||||||
|
- $last-name
|
||||||
|
- /home/
|
||||||
|
|
||||||
|
backend-attributes:
|
||||||
|
ldap: home
|
||||||
|
ad: Home
|
||||||
|
|
||||||
|
password:
|
||||||
|
decription: "Password of the user"
|
||||||
|
display_name: "Password"
|
||||||
|
self: true
|
||||||
|
type: pwd
|
||||||
|
|
27
ldapcherry/attributes.py
Normal file
27
ldapcherry/attributes.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim:set expandtab tabstop=4 shiftwidth=4:
|
||||||
|
#
|
||||||
|
# The MIT License (MIT)
|
||||||
|
# LdapCherry
|
||||||
|
# Copyright (c) 2014 Carpentier Pierre-Francois
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
try:
|
||||||
|
from yaml import CLoader as Loader, CDumper as Dumper
|
||||||
|
except ImportError:
|
||||||
|
from yaml import Loader, Dumper
|
||||||
|
|
||||||
|
class Attributes:
|
||||||
|
|
||||||
|
def __init__(self, attributes_file):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_selfattributes(self):
|
||||||
|
"""get the list of groups from roles"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_addattributes(self):
|
||||||
|
"""get the list of groups from roles"""
|
||||||
|
pass
|
Loading…
Reference in New Issue
Block a user