Example #1
0
    def update(self, req, resp, id):
        user = obj(req, tradius_user, sql_id=id, hide=('password', ))
        if req.json.get('password'):
            user['password'] = md5sum(req.json['password'])

        user.commit()
        return user
Example #2
0
 def ips(self, req, resp, id):
     pool = obj(req, tradius_pool, sql_id=id)
     return sql_list(req,
                     'tradius_ippool', (
                         'id',
                         'pool_name',
                         'framedipaddress',
                         'nasipaddress',
                         'expiry_time',
                         'username',
                     ),
                     where={'pool_name': pool['pool_name']})