Revision 01d932ad src/rm/RequestManagerPoolInfo.cc

View differences:

src/rm/RequestManagerPoolInfo.cc
28 28
{
29 29
    ostringstream oss;
30 30
    int rc;
31
 
31

  
32
    //Authorize the operation
33
    if ( uid != 0 ) // uid == 0 means oneadmin
34
    {
35
        AuthRequest ar(uid);
36

  
37
        ar.add_auth(auth_object,
38
                    -1,
39
                    AuthRequest::INFO_POOL,
40
                    0,
41
                    false);
42

  
43
        if (UserPool::authorize(ar) == -1)
44
        {
45
            goto error_authorize;
46
        }
47
    }
48

  
32 49
    // Call the template pool dump
33 50
    rc = pool->dump(oss,"");
34 51

  
......
40 57
    success_response(oss.str());
41 58

  
42 59
    return;
60
//TODO Get the object name from the AuthRequest Class
61
error_authorize:
62
    failure_response(AUTHORIZATION,
63
                     authorization_error("INFO","USER",uid,-1));
64
    return;
43 65

  
44 66
error_dump: //TBD Improve Error messages for DUMP
45
    oss.str();
46 67
    failure_response(INTERNAL,"Internal Error");
47 68
    return;
48 69
}

Also available in: Unified diff