<commit_before># -------------------------------------------------------------------------- #
# Copyright 2002-2013, OpenNebula Project (OpenNebula.org), C12G Labs        #
#                                                                            #
# Licensed under the Apache License, Version 2.0 (the "License"); you may    #
# not use this file except in compliance with the License. You may obtain    #
# a copy of the License at                                                   #
#                                                                            #
# http://www.apache.org/licenses/LICENSE-2.0                                 #
#                                                                            #
# Unless required by applicable law or agreed to in writing, software        #
# distributed under the License is distributed on an "AS IS" BASIS,          #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
# See the License for the specific language governing permissions and        #
# limitations under the License.                                             #
#--------------------------------------------------------------------------- #

require 'digest/sha1'

class Session
    PERMISSIONS = {
        :user => {
            :create => {
                :anonymous  => false,
                :user       => false,
                :worker     => false,
                :admin      => true
            },
            :show => {
                :anonymous  => false,
                :user       => false,
                :worker     => false,
                :admin      => true
            },
            :delete => {
                :anonymous  => false,
                :user       => false,
                :worker     => false,
                :admin      => true
            },
            :update => {
                :anonymous  => false,
                :user       => false,
                :worker     => false,
                :admin      => true
            },
            :list => {
                :anonymous  => false,
                :user       => false,
                :worker     => false,
                :admin      => true
            },
            :enable => {
                :anonymous  => false,
                :user       => false,
                :worker     => false,
                :admin      => true
            },
            :schema => {
                :anonymous => AppConverter::User::SCHEMA,
                :user      => AppConverter::User::SCHEMA,
                :worker    => AppConverter::User::SCHEMA,
                :admin     => AppConverter::User::ADMIN_SCHEMA
            }
        },
        :appliance => {
            :create => {
                :anonymous  => false,
                :user       => true,
                :worker     => false,
                :admin      => true
            },
            :show => {
                :anonymous  => true,
                :user       => true,
                :worker     => false,
                :admin      => true
            },
            :delete => {
                :anonymous  => false,
                :user       => true,
                :worker     => false,
                :admin      => true
            },
            :update => {
                :anonymous  => false,
                :user       => true,
                :worker     => false,
                :admin      => true
            },
            :list => {
                :anonymous  => true,
                :user       => true,
                :worker     => false,
                :admin      => true
            },
            :download => {
                :anonymous  => true,
                :user       => true,
                :worker     => false,
                :admin      => true
            },
            :clone => {
                :anonymous  => false,
                :user       => true,
                :worker     => false,
                :admin      => true
            },
            :schema => {
                :anonymous => AppConverter::Appliance::SCHEMA,
                :user      => AppConverter::Appliance::SCHEMA,
                :worker    => AppConverter::Appliance::SCHEMA,
                :admin     => AppConverter::Appliance::ADMIN_SCHEMA
            }
        },
        :job => {
            :create => {
                :anonymous  => false,
                :user       => false,
                :worker     => false,
                :admin      => true
            },
            :show => {
                :anonymous  => false,
                :user       => false,
                :worker     => false,
                :admin      => true
            },
            :delete => {
                :anonymous  => false,
                :user       => false,
                :worker     => false,
                :admin      => true
            },
            :list => {
                :anonymous  => false,
                :user       => false,
                :worker     => false,<commit_msg>After a callback update the appliance status<commit_after># -------------------------------------------------------------------------- #
# Copyright 2002-2013, OpenNebula Project (OpenNebula.org), C12G Labs        #
#                                                                            #
# Licensed under the Apache License, Version 2.0 (the "License"); you may    #
# not use this file except in compliance with the License. You may obtain    #
# a copy of the License at                                                   #
#                                                                            #
# http://www.apache.org/licenses/LICENSE-2.0                                 #
#                                                                            #
# Unless required by applicable law or agreed to in writing, software        #
# distributed under the License is distributed on an "AS IS" BASIS,          #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
# See the License for the specific language governing permissions and        #
# limitations under the License.                                             #
#--------------------------------------------------------------------------- #

require 'digest/sha1'

class Session
    PERMISSIONS = {
        :user => {
            :create => {
                :anonymous  => false,
                :user       => false,
                :worker     => false,
                :admin      => true
            },
            :show => {
                :anonymous  => false,
                :user       => false,
                :worker     => false,
                :admin      => true
            },
            :delete => {
                :anonymous  => false,
                :user       => false,
                :worker     => false,
                :admin      => true
            },
            :update => {
                :anonymous  => false,
                :user       => false,
                :worker     => false,
                :admin      => true
            },
            :list => {
                :anonymous  => false,
                :user       => false,
                :worker     => false,
                :admin      => true
            },
            :enable => {
                :anonymous  => false,
                :user       => false,
                :worker     => false,
                :admin      => true
            },
            :schema => {
                :anonymous => AppConverter::User::SCHEMA,
                :user      => AppConverter::User::SCHEMA,
                :worker    => AppConverter::User::SCHEMA,
                :admin     => AppConverter::User::ADMIN_SCHEMA
            }
        },
        :appliance => {
            :create => {
                :anonymous  => false,
                :user       => true,
                :worker     => false,
                :admin      => true
            },
            :show => {
                :anonymous  => true,
                :user       => true,
                :worker     => false,
                :admin      => true
            },
            :delete => {
                :anonymous  => false,
                :user       => true,
                :worker     => false,
                :admin      => true
            },
            :update => {
                :anonymous  => false,
                :user       => true,
                :worker     => false,
                :admin      => true
            },
            :list => {
                :anonymous  => true,
                :user       => true,
                :worker     => false,
                :admin      => true
            },
            :download => {
                :anonymous  => true,
                :user       => true,
                :worker     => false,
                :admin      => true
            },
            :clone => {
                :anonymous  => false,
                :user       => true,
                :worker     => false,
                :admin      => true
            },
            :schema => {
                :anonymous => AppConverter::Appliance::SCHEMA,
                :user      => AppConverter::Appliance::SCHEMA,
                :worker    => AppConverter::Appliance::ADMIN_SCHEMA,
                :admin     => AppConverter::Appliance::ADMIN_SCHEMA
            }
        },
        :job => {
            :create => {
                :anonymous  => false,
                :user       => false,
                :worker     => false,
                :admin      => true
            },
            :show => {
                :anonymous  => false,
                :user       => false,
                :worker     => false,
                :admin      => true
            },
            :delete => {
                :anonymous  => false,
                :user       => false,
                :worker     => false,
                :admin      => true
            },
            :list => {
                :anonymous  => false,
                :user       => false,
                :worker     => false,
{'fraction_non_alphanumeric': 0.1288109008920694, 'fraction_numerical': 0.0029408881482207625, 'mean_word_length': 0.7172193233462381, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 197, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 28, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2440521', 'n_tokens_mistral': 2333, 'n_tokens_neox': 2147, 'n_words': 531}