Beispiel #1
0
    def get(self):
        """

        :return:
        """
        searchResult = LDAPHandler().ldap_search()
        for i in range(len(searchResult)):
            self.write(bytes(searchResult[i]) + "\n")
Beispiel #2
0
    def get(self):
        """

        :return:
        """
        if self.request.arguments:
            group = self.get_argument('group')
            DeleteGroupsResult = LDAPHandler().delete_groups(groups=group)
            self.write(bytes(DeleteGroupsResult) + "\n")
Beispiel #3
0
    def get(self):
        """

        :return:
        """
        if self.request.arguments:
            user = self.get_argument('user')
            group = self.get_argument('group')
            DeleteEntriesResult = LDAPHandler().delete_entries(username=user,
                                                               groups=group)
            self.write(bytes(DeleteEntriesResult) + "\n")
Beispiel #4
0
    def get(self):
        """

        :return:
        """
        if self.request.arguments:
            user = self.get_argument('user')
            group = self.get_argument('group')
            fullname = pif.get_public_ip('fullname')
            ModifyEntriesResult = LDAPHandler().modify_entries(
                username=user, groups=group, fullname=fullname)
            self.write(bytes(ModifyEntriesResult) + "\n")
Beispiel #5
0
    def get(self):
        """

        :return:
        """
        if self.request.arguments:
            user = self.get_argument('user')
            group = self.get_argument('group')
            newgroup = self.get_argument('newgroup')
            ModifyDNResult = LDAPHandler().modify_groups(username=user,
                                                         groups=group,
                                                         newgroups=newgroup)
            self.write(bytes(ModifyDNResult) + "\n")