Revision 5bde303f src/rm/Request.cc

View differences:

src/rm/Request.cc
147 147
/* -------------------------------------------------------------------------- */
148 148
/* -------------------------------------------------------------------------- */
149 149

  
150
string Request::object_name(AuthRequest::Object ob)
151
{
152
    switch (ob)
153
    {
154
        case AuthRequest::VM:
155
            return "virtual machine";
156
        case AuthRequest::HOST:
157
            return "host";
158
        case AuthRequest::NET:
159
            return "virtual network";
160
        case AuthRequest::IMAGE:
161
            return "image";
162
        case AuthRequest::USER:
163
            return "user";
164
        case AuthRequest::CLUSTER:
165
            return "cluster";
166
        case AuthRequest::TEMPLATE:
167
            return "virtual machine template";
168
        case AuthRequest::GROUP:
169
            return "group";
170
        default:
171
            return "-";
172
      }
173
};
174

  
175
/* -------------------------------------------------------------------------- */
176
/* -------------------------------------------------------------------------- */
177

  
150 178
string Request::authorization_error (const string &action,
151 179
                                     const string &object,
152 180
                                     int   uid,

Also available in: Unified diff