Revision 24a5c9e6 src/sunstone/sunstone-server.rb

View differences:

src/sunstone/sunstone-server.rb
193 193
            csrftoken_plain = Time.now.to_f.to_s + SecureRandom.base64
194 194
            session[:csrftoken] = Digest::MD5.hexdigest(csrftoken_plain)
195 195

  
196
            group = OpenNebula::Group.new_with_id(user['GID'], client)
197
            rc = group.info
198
            if OpenNebula.is_error?(rc)
199
                logger.error { rc.message }
200
                return [500, ""]
201
            end
202

  
196 203
            #User IU options initialization
197 204
            #Load options either from user settings or default config.
198 205
            # - LANG
......
222 229

  
223 230
            if user['TEMPLATE/DEFAULT_VIEW']
224 231
                session[:default_view] = user['TEMPLATE/DEFAULT_VIEW']
232
            elsif group['TEMPLATE/DEFAULT_VIEW']
233
                session[:default_view] = group['TEMPLATE/DEFAULT_VIEW']
225 234
            else
226 235
                session[:default_view] = $views_config.available_views(session[:user], session[:user_gname]).first
227 236
            end

Also available in: Unified diff