1
0
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:
kakwa 2015-04-16 22:07:45 +02:00
parent 43299cb52f
commit 67b6c27273
2 changed files with 117 additions and 0 deletions

90
conf/attributes.yml Normal file
View 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
View 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