History log of /ontohub/lib/permissionable.rb
Revision Date Author Comments Expand
5a102b3c56d4ac75632c7e9244ee0ce5bdbbf13a 01-Jul-2016 Sascha Graef <sgraef@informatik.uni-bremen.de>

Improve locId (#1618) * introduce new model to ontohub * introduce new locid behavior * adding try to prevent undefined method for nil * generate the locids by object creation * introduce method to simulate an attribute * generate Locids correctly for ontologies * correct creation of child_ontology locids * remove old uniqueness validation for ontology locid * use better names vor locidportion * correct behaviour for locid creation * generate loc_id correctly for ontology * use correct class for inherritanc * remove locids on deletion of objects * rename the base model * introduce data-migration to move the locids * remove double naming in the cat ontology * obey hound * correct behaviour of external repository for locid * change factory behaviour for locid * fix missing comma * begin to fix test * change ontology factory to new locid * change factories for new LocId Model * remove unneeded test * Use proper class retrieval in factories. * Always use to_s on the class call in LocIdBaseModel. * Always use .class.to_s instead of .class when used for the database. * Fix external repository. * Be clean and unstub again. * Fix sentence factory. * Quick fix the destruction of locids. * Fix code style. * Generate locids during create process: Base class. * Generate locids during create process: Mapping. * Generate locids during create process: Sentence. * Generate locids during create process: Symbol. * Generate locids during create process: ProofAttempt. * Generate locids during create process: ProverOutput. * Generate locids during create process: Ontology #1. * Generate locids during create process: Ontology #2. * Generate locids during create process: Ontology #3. * Generate locids during create process: Factories. * Fix seeds errors. * Fix ontology spec on error while parsing The ontology needs to be reloaded because sidekiq does so as well. It always fetches a fresh record from the database. The test failed before because `NodeEvaluationHelper#clean_ontology` called destroy on all the ontology's symbols which existed in the object, but were not really persisted because of an aborted transaction. * Remove redundant space. * Move comment to the correct line. * Fix worker_spec In the production code, the locid is never set before saving the ontology. * Add gems pry-stack_explorer, awesome_print for debugging purposes. * Only start hets if there was a hets error and rollback the changes. * Destroy dependent prover output. * Fix ProofAttempt factory. * Rename assorted_object to specific and fix migration. * Fix migration code style. * Reanalyze ontologies with duplicate locids. * Fix code style. * Remove redundancies. * Remove useless association. * Obey Hound. * Directly query in the LocIdBaseModel. * Add locid routing feature. * Cache LocId query results This should speed up the routing in a great extent. For each matching `specified_get`, the LocIdRouterConstraint fetched the element once from the database. This resulted in 8 times the same SQL query for a ProofAttempt. The implemented cache reduces this to a single query. * Clear the elements cache periodically to prevent memory leaks. * Add missing dependent: :destroy. * Add Recreating repository feature. * Combine if statements. * Change Given to When. * Catch ambiguous locid error. * Fix i18n key usage. * Fix code style. * Comment on error suppression. * Add spec for Syntax Error. * Use single-quoted strings. * Fix error message check: language. * Keep parameter assignment DRY. * Rename RecreatingRepository feature to Repository. * Use local_variable_get instead of eval. * Change locid column type to text. * Implement (implicit) down-migration. * Implement (explicit) down migration. * Add migration to create missing locids. * Fix nil error. * Really fix nil error. * Fix migration. * Fix sentence migration accessing association. * Force old Mappings to have a name. * Add missing locids to symbols.

/ontohub/Gemfile /ontohub/Gemfile.lock /ontohub/app/models/loc_id.rb /ontohub/app/models/loc_id_base_model.rb /ontohub/app/models/mapping.rb /ontohub/app/models/ontology.rb /ontohub/app/models/ontology/associations_and_attributes.rb /ontohub/app/models/ontology/class_methods_and_scopes.rb /ontohub/app/models/ontology/mappings.rb /ontohub/app/models/ontology/sentences.rb /ontohub/app/models/ontology/symbols.rb /ontohub/app/models/ontology/validations.rb /ontohub/app/models/ontology_member/symbol.rb /ontohub/app/models/proof_attempt.rb /ontohub/app/models/prover_output.rb /ontohub/app/models/sentence.rb /ontohub/config/locales/en.yml /ontohub/db/data/20160310132620_move_loc_id_to_own_model_data.rb /ontohub/db/migrate/20160110133824_create_loc_ids.rb /ontohub/db/migrate/20160310132618_enter_name_for_mappings.rb /ontohub/db/migrate/20160310132619_create_missing_locids.rb /ontohub/db/migrate/20160310132620_move_loc_id_to_own_model.rb /ontohub/db/seeds/040-git.rb /ontohub/features/LocId.feature /ontohub/features/LocIdRouting.feature /ontohub/features/Repository.feature /ontohub/features/step_definitions/loc_id_routing_steps.rb /ontohub/features/step_definitions/loc_id_steps.rb /ontohub/features/step_definitions/repository_steps.rb /ontohub/features/support/env.rb external_repository.rb hets/dg/node_evaluation_helper.rb hets/dg/node_evaluator.rb hets/errors.rb ontology_saver.rb permissionable.rb router_constraints.rb /ontohub/spec/controllers/api/v1/proof_attempts_controller_spec.rb /ontohub/spec/controllers/api/v1/prover_outputs_controller_spec.rb /ontohub/spec/factories/axiom_factory.rb /ontohub/spec/factories/mapping_factory.rb /ontohub/spec/factories/mapping_version_factory.rb /ontohub/spec/factories/ontology_factory.rb /ontohub/spec/factories/proof_attempt_factory.rb /ontohub/spec/factories/sentence_factory.rb /ontohub/spec/factories/symbol_factory.rb /ontohub/spec/factories/theorem_factory.rb /ontohub/spec/fixtures/ontologies/casl/sentence_and_symbol_with_same_name.casl /ontohub/spec/hets_helper.rb /ontohub/spec/lib/ontology_batch_parse_worker_spec.rb /ontohub/spec/lib/worker_spec.rb /ontohub/spec/models/ontology_spec.rb /ontohub/spec/models/ontology_version/parsing_spec.rb /ontohub/spec/support/common_helper_methods.rb /ontohub/spec/support/fixtures_generation/pipeline_generator.rb
7cebbca4a9b47c808a410ea86b5e8ba3926a8179 03-Sep-2014 Tim Reddehase <robustus@rightsrestricted.com>

fix style considerations.

4b8357d9eb7f8dda17322add358a476bde2135d5 21-Aug-2014 Tim Reddehase <robustus@rightsrestricted.com>

fix erroring spec regarding permissions In ontology_spec the IRI-Processing-Try-Again example failed with a double-create of the same permission. This now only creates new permission if there does not yet exist an applicable one.

ee5342a8882c2fc7631fcffb5497e6597747887c 10-May-2014 Tim Reddehase <robustus@rightsrestricted.com>

fix whitespace issues Includes fixes for the following whitespace-related issues: - Trailing whitespace at end of line - Tabs in file - No newline at end of file This commit fixes these issues for .rb, .coffee, and .sass files.

/ontohub/app/assets/javascripts/bulkupload.js.coffee /ontohub/app/assets/javascripts/flash.js.coffee /ontohub/app/assets/javascripts/highlight_anchor.js.coffee /ontohub/app/assets/javascripts/oops.js.coffee /ontohub/app/assets/javascripts/plugins/relationList.js.coffee /ontohub/app/assets/javascripts/plugins/remoteCollection.js.coffee /ontohub/app/assets/javascripts/statusUpdates.js.coffee /ontohub/app/assets/javascripts/tooltips.js.coffee /ontohub/app/assets/stylesheets/actions.css.sass /ontohub/app/assets/stylesheets/aside.css.sass /ontohub/app/assets/stylesheets/axioms.css.sass /ontohub/app/assets/stylesheets/bulkupload.css.sass /ontohub/app/assets/stylesheets/comments.css.sass /ontohub/app/assets/stylesheets/data_type.css.sass /ontohub/app/assets/stylesheets/entities.css.sass /ontohub/app/assets/stylesheets/formats.sass /ontohub/app/assets/stylesheets/latest.css.sass /ontohub/app/assets/stylesheets/oops-responses.css.sass /ontohub/app/assets/stylesheets/pagination.sass /ontohub/app/assets/stylesheets/quicksearch.css.sass /ontohub/app/assets/stylesheets/relationList.css.sass /ontohub/app/assets/stylesheets/repository.css.sass /ontohub/app/assets/stylesheets/search_result.css.sass /ontohub/app/assets/stylesheets/section.css.sass /ontohub/app/assets/stylesheets/sentences.css.sass /ontohub/app/controllers/adjoints_controller.rb /ontohub/app/controllers/admin/teams_controller.rb /ontohub/app/controllers/admin/users_controller.rb /ontohub/app/controllers/api/v1/base.rb /ontohub/app/controllers/api/v1/categories_controller.rb /ontohub/app/controllers/api/v1/ontologies_controller.rb /ontohub/app/controllers/api/v1/repositories_controller.rb /ontohub/app/controllers/application_controller.rb /ontohub/app/controllers/autocomplete_controller.rb /ontohub/app/controllers/children_controller.rb /ontohub/app/controllers/commit_references_controller.rb /ontohub/app/controllers/entities_search_controller.rb /ontohub/app/controllers/errors_controller.rb /ontohub/app/controllers/home_controller.rb /ontohub/app/controllers/keys_controller.rb /ontohub/app/controllers/language_adjoints_controller.rb /ontohub/app/controllers/language_mappings_controller.rb /ontohub/app/controllers/languages_controller.rb /ontohub/app/controllers/links_controller.rb /ontohub/app/controllers/logic_adjoints_controller.rb /ontohub/app/controllers/logic_mappings_controller.rb /ontohub/app/controllers/logics_controller.rb /ontohub/app/controllers/mappings_controller.rb /ontohub/app/controllers/metadata_controller.rb /ontohub/app/controllers/ontologies_controller.rb /ontohub/app/controllers/ontology_search_controller.rb /ontohub/app/controllers/ontology_version_member.rb /ontohub/app/controllers/ontology_versions_controller.rb /ontohub/app/controllers/oops_requests_controller.rb /ontohub/app/controllers/path_helpers.rb /ontohub/app/controllers/permissions_controller.rb /ontohub/app/controllers/polymorphic_resource/base.rb /ontohub/app/controllers/privilege_list/base.rb /ontohub/app/controllers/repository_settings_controller.rb /ontohub/app/controllers/sentences_controller.rb /ontohub/app/controllers/supports_controller.rb /ontohub/app/controllers/team_users_controller.rb /ontohub/app/controllers/teams/permissions_controller.rb /ontohub/app/controllers/teams_controller.rb /ontohub/app/controllers/users/confirmations_controller.rb /ontohub/app/controllers/users/registrations_controller.rb /ontohub/app/controllers/users_controller.rb /ontohub/app/helpers/application_helper.rb /ontohub/app/helpers/comments_helper.rb /ontohub/app/helpers/entity_helper.rb /ontohub/app/helpers/flash_helper.rb /ontohub/app/helpers/link_helper.rb /ontohub/app/helpers/navigation_helper.rb /ontohub/app/helpers/ontology_helper.rb /ontohub/app/helpers/oops_helper.rb /ontohub/app/helpers/pagination_helper.rb /ontohub/app/helpers/permission_helper.rb /ontohub/app/helpers/search_helper.rb /ontohub/app/helpers/tag_helper.rb /ontohub/app/helpers/timestamp_helper.rb /ontohub/app/helpers/title_helper.rb /ontohub/app/models/ability.rb /ontohub/app/models/comment.rb /ontohub/app/models/e_edge.rb /ontohub/app/models/entity.rb /ontohub/app/models/entity/readability.rb /ontohub/app/models/entity/searching.rb /ontohub/app/models/entity_group.rb /ontohub/app/models/key.rb /ontohub/app/models/key/fingerprint.rb /ontohub/app/models/language.rb /ontohub/app/models/language_mapping.rb /ontohub/app/models/link.rb /ontohub/app/models/link_version.rb /ontohub/app/models/logic.rb /ontohub/app/models/logic_mapping.rb /ontohub/app/models/metadatum.rb /ontohub/app/models/ontology/categories.rb /ontohub/app/models/ontology/entities.rb /ontohub/app/models/ontology/import.rb /ontohub/app/models/ontology/links.rb /ontohub/app/models/ontology/oops.rb /ontohub/app/models/ontology/versions.rb /ontohub/app/models/ontology_version.rb /ontohub/app/models/ontology_version/files.rb /ontohub/app/models/ontology_version/numbers.rb /ontohub/app/models/ontology_version/oops_requests.rb /ontohub/app/models/ontology_version/parsing.rb /ontohub/app/models/ontology_version/states.rb /ontohub/app/models/oops_request.rb /ontohub/app/models/oops_request/responses.rb /ontohub/app/models/oops_request/states.rb /ontohub/app/models/oops_response.rb /ontohub/app/models/permission.rb /ontohub/app/models/repository/access.rb /ontohub/app/models/repository/file_not_found_error.rb /ontohub/app/models/repository/files_list.rb /ontohub/app/models/repository/import_error.rb /ontohub/app/models/repository/importing.rb /ontohub/app/models/repository/symlink.rb /ontohub/app/models/repository/validations.rb /ontohub/app/models/resource.rb /ontohub/app/models/sentence/readability.rb /ontohub/app/models/serialization.rb /ontohub/app/models/simple_ontology.rb /ontohub/app/models/support.rb /ontohub/app/models/team.rb /ontohub/app/models/team_user.rb /ontohub/app/models/user.rb /ontohub/app/models/user/authentication.rb /ontohub/config/god/app.rb /ontohub/config/god/sidekiq_workers.rb /ontohub/config/initializers/active_record_base.rb /ontohub/config/initializers/async_helper.rb /ontohub/config/initializers/rabl_init.rb /ontohub/config/routes.rb /ontohub/db/migrate/20120307143552_create_ontologies.rb /ontohub/db/migrate/20120307163615_create_links.rb /ontohub/db/migrate/20120308144854_create_teams.rb /ontohub/db/migrate/20120308144855_create_team_users.rb /ontohub/db/migrate/20120308144859_create_permissions.rb /ontohub/db/migrate/20120313131338_create_comments.rb /ontohub/db/migrate/20120416190216_create_serializations.rb /ontohub/db/migrate/20120416191514_create_link_versions.rb /ontohub/db/migrate/20120424155606_create_logic_mappings.rb /ontohub/db/migrate/20120424155621_create_language_mappings.rb /ontohub/db/migrate/20120424162211_create_language_adjoints.rb /ontohub/db/migrate/20120424162227_create_logic_adjoints.rb /ontohub/db/migrate/20120511162259_create_basic_proofs.rb /ontohub/db/migrate/20120511162609_create_structured_proof_parts.rb /ontohub/db/migrate/20120511162723_create_used_sentences.rb /ontohub/db/migrate/20130422184444_create_c_vertices_table.rb /ontohub/db/migrate/20130516165857_add_ontolgies_count_to_logics.rb /ontohub/db/migrate/20130730100410_remove_link_version_from_entity_mapping.rb /ontohub/db/migrate/20130826115853_create_ontology_type.rb /ontohub/db/migrate/20130924161345_add_license_models_to_ontologies.rb /ontohub/db/migrate/20130924224533_add_formality_levels_to_ontologies.rb /ontohub/db/migrate/20131108101521_rename_c_vertices_to_categories.rb /ontohub/db/migrate/20131108103128_rename_c_vertices_ontology_table_to_categories_ontology_table.rb /ontohub/db/migrate/20131206114523_rename_license_model_ontology_table_to_license_models_ontologies_table.rb /ontohub/db/migrate/20140329102152_create_entity_groups.rb /ontohub/db/migrate/20140329162713_remove_cycle_checker_from_e_edges.rb /ontohub/db/migrate/20140409093111_add_constratints_and_indices_to_entity_groups.rb /ontohub/db/migrate/20140508073115_remove_all_eedges_and_generate_tarjan_trees.rb /ontohub/db/seeds/010-users_and_teams.rb autocomplete.rb git_repository.rb git_repository/cloning.rb git_repository/commit.rb git_repository/config.rb git_repository/get_info_list.rb git_repository/url_not_found_error.rb hets.rb language_population.rb logic_mapping_population.rb logic_population.rb logicgraph_parser.rb ontology_search.rb oops.rb oops/client.rb oops/response.rb pagination.rb permissionable.rb relation_list.rb scope_builder.rb sidetiq_worker.rb state_updater.rb tarjan_tree.rb worker.rb /ontohub/spec/controllers/api/v1/ontologies_controller_spec.rb /ontohub/spec/controllers/api/v1/repositories_controller_spec.rb /ontohub/spec/controllers/comments_controller_spec.rb /ontohub/spec/controllers/keys_controller_spec.rb /ontohub/spec/controllers/repository_settings_controller_spec.rb /ontohub/spec/lib/repository/import/git_spec.rb /ontohub/spec/lib/repository/import/svn_spec.rb /ontohub/spec/lib/tarjan_spec.rb /ontohub/spec/models/ability_spec.rb /ontohub/spec/models/entity_group_spec.rb /ontohub/spec/models/key_spec.rb /ontohub/spec/models/project.rb /ontohub/spec/models/url_map_spec.rb /ontohub/spec/routing/files_routing_spec.rb /ontohub/spec/support/config/sunspot.rb /ontohub/test/factories/adjoint.rb /ontohub/test/factories/c_edge.rb /ontohub/test/factories/entity.rb /ontohub/test/factories/entity_group.rb /ontohub/test/factories/logic.rb /ontohub/test/factories/mapping.rb /ontohub/test/factories/ontology_version.rb /ontohub/test/factories/oops.rb /ontohub/test/factories/sentence.rb /ontohub/test/factories/serialization.rb /ontohub/test/factories/user.rb /ontohub/test/functional/admin/teams_controller_test.rb /ontohub/test/functional/admin/users_controller_test.rb /ontohub/test/functional/autocomplete_controller_test.rb /ontohub/test/functional/entities_controller_test.rb /ontohub/test/functional/entities_search_controller_test.rb /ontohub/test/functional/home_controller_test.rb /ontohub/test/functional/language_adjoint_controller_test.rb /ontohub/test/functional/language_controller_test.rb /ontohub/test/functional/language_mapping_controller_test.rb /ontohub/test/functional/logic_adjoint_controller_test.rb /ontohub/test/functional/logic_controller_test.rb /ontohub/test/functional/logic_mapping_controller_test.rb /ontohub/test/functional/ontologies_controller_test.rb /ontohub/test/functional/ontology_versions_controller_test.rb /ontohub/test/functional/oops_request_controller_test.rb /ontohub/test/functional/permissions_controller_test.rb /ontohub/test/functional/repositories_controller_test.rb /ontohub/test/functional/sentences_controller_test.rb /ontohub/test/functional/serializations_controller_test.rb /ontohub/test/functional/team_users_controller_test.rb /ontohub/test/functional/teams/permissions_controller_test.rb /ontohub/test/functional/teams_controller_test.rb /ontohub/test/functional/users_controller_test.rb /ontohub/test/integration/comments_test.rb /ontohub/test/integration/entity_display_test.rb /ontohub/test/integration/ontology_state.rb /ontohub/test/integration/permissions_test.rb /ontohub/test/integration/session_test.rb /ontohub/test/integration/visit_ontology_test.rb /ontohub/test/integration_test_helper.rb /ontohub/test/shared_helper.rb /ontohub/test/test_helper.rb /ontohub/test/unit/autocomplete_test.rb /ontohub/test/unit/category_test.rb /ontohub/test/unit/distributed_ontology_test.rb /ontohub/test/unit/entity_test.rb /ontohub/test/unit/formality_level_test.rb /ontohub/test/unit/language_population_test.rb /ontohub/test/unit/license_model_test.rb /ontohub/test/unit/logic_population_test.rb /ontohub/test/unit/logic_test.rb /ontohub/test/unit/logicgraph_parser/stub_test.rb /ontohub/test/unit/logicgraph_parser_test.rb /ontohub/test/unit/ontology_import_xml_test.rb /ontohub/test/unit/ontology_parser/distributed_test.rb /ontohub/test/unit/ontology_parser/single_test.rb /ontohub/test/unit/ontology_parser_test.rb /ontohub/test/unit/ontology_search_test.rb /ontohub/test/unit/ontology_test.rb /ontohub/test/unit/ontology_type_test.rb /ontohub/test/unit/ontology_version_test.rb /ontohub/test/unit/oops_request/responses_test.rb /ontohub/test/unit/oops_request/states_test.rb /ontohub/test/unit/oops_request_test.rb /ontohub/test/unit/oops_test.rb /ontohub/test/unit/permission_test.rb /ontohub/test/unit/repository_test.rb /ontohub/test/unit/sentence_test.rb /ontohub/test/unit/task_test.rb /ontohub/test/unit/team_test.rb /ontohub/test/unit/team_user_test.rb /ontohub/test/unit/tool_test.rb /ontohub/test/unit/triple_store_test.rb /ontohub/test/unit/user_test.rb
cd95118c2f49896d18b3c85236742fef7b655960 23-Jan-2014 Tim Reddehase <robustus@rightsrestricted.com>

add methods to retrieve highest permission - and use it for ssh-push access determination - makes tests green.

431a54a039187e66ead399a3c4db5fa66e67866f 22-Dec-2013 henning mueller <henning@orgizm.net>

Fixed permission? method for :reader role.

930c3dc1d778b713c3c77550f1c82d8ef8d7fa8e 19-Jun-2013 Julian Kornberger <juliank@tzi.de>

Cleaned up duplicate code.

34e099cc5492a3d9342cd06d9eff2dbc13f98f19 19-Jun-2013 Julian Kornberger <juliank@tzi.de>

Cleaned up duplicate code.

7370e7c0b5ad73069c8c42f5b399d0285b5e4f48 15-Aug-2012 Julian Kornberger <juliank@tzi.de>

Permission check fixed - had been broken by STI

cbb18f95cb8354f0c3fb44ba5134dadc7ad6b2ec 14-Mar-2012 Julian Kornberger <juliank@tzi.de>

[#26399041] Counter caches for comments and metadata

7b025f9d9726413eb3f50ca2b39826e7eed816fb 12-Mar-2012 Julian Kornberger <juliank@tzi.de>

CanCan integrated

d62eba79f306957dd89ea9d3313600e98e2a8beb 12-Mar-2012 Julian Kornberger <juliank@tzi.de>

Heavy refacoring of Permissions-Widget

/ontohub/app/assets/javascripts/permissionList.js /ontohub/app/assets/javascripts/plugins/permissionList.js /ontohub/app/controllers/permissions_controller.rb /ontohub/app/controllers/privilege_list/base.rb /ontohub/app/controllers/team_users_controller.rb /ontohub/app/controllers/teams_controller.rb /ontohub/app/models/permission.rb /ontohub/app/views/ontologies/show.html.haml /ontohub/app/views/permission_list/_permission_list.html.haml /ontohub/app/views/permissions/_form.html.haml /ontohub/app/views/permissions/_permission.haml /ontohub/app/views/permissions/index.html.haml /ontohub/app/views/team_users/_form.html.haml /ontohub/app/views/team_users/_team_user.html.haml /ontohub/app/views/teams/_user.html.haml /ontohub/app/views/teams/show.html.haml /ontohub/config/locales/en.yml /ontohub/config/routes.rb autocomplete.rb permission_list.rb permissionable.rb /ontohub/test/functional/autocomplete_controller_test.rb /ontohub/test/functional/permissions_controller_test.rb /ontohub/test/functional/team_users_controller_test.rb /ontohub/test/functional/teams_controller_test.rb /ontohub/test/unit/autocomplete_test.rb
8c1be7aa00ddeb367fac5d3e8574429a301dbeb7 09-Mar-2012 Julian Kornberger <juliank@tzi.de>

object renamed into item