ubicloud/prog/vnet
Jeremy Evans 215f09541a Make access_tag only for project <-> accounts join table
For the includers of HyperTagMethods, this changes the authorization
code and object_tag member validation code to look at the project_id
column for the object, instead of looking a row with the project and
object in the access_tag table.

This removes all calls to associate_with_project, other than
those for Account.  It removes the projects association for
the includers of HyperTagMethods, and adds a project association to
the models that didn't already have one, since there is only a single
project for each object now.

Most HyperTagMethods code is inlined into Account, since it is only
user of the code now.  Temporarily, other models will still include
HyperTagMethods for the before_destroy hook, but eventually it will
go away completely.

The associations in Projects that previous used access_tag as a join
table, are changed from many_to_many to one_to_many, except for
Account (which still uses the join table).

Project#has_resources now needs separate queries for all of the
resource classes to see if there any associated objects.

This causes a lot of fallout in the specs, but unfortunately that is
unavoidable due the extensive use of projects.first in the specs to
get the related project for the objects, as well as the extensive
use of associate_with_project.
2025-01-17 08:32:46 -08:00
..
cert_nexus.rb Get semaphores from the subject of prog 2024-12-26 12:14:33 +03:00
cert_server.rb CP start using put-certificate endpoint in DP for metadata-endpoint 2025-01-09 16:44:52 +01:00
load_balancer_health_probes.rb Selectively run Load Balancer health probes for each stack 2025-01-08 12:36:32 +01:00
load_balancer_nexus.rb Make access_tag only for project <-> accounts join table 2025-01-17 08:32:46 -08:00
nic_nexus.rb Fix Nic label progress sync issue after VM allocation 2025-01-08 16:49:59 +01:00
rekey_nic_tunnel.rb Move nic gateway setting from controlplane 2024-11-07 09:24:29 +01:00
subnet_nexus.rb Make access_tag only for project <-> accounts join table 2025-01-17 08:32:46 -08:00
update_firewall_rules.rb Mark lb packets to be forwarded to local and apply FW rules 2025-01-08 11:47:35 +01:00
update_load_balancer_node.rb Mark lb packets to be forwarded to local and apply FW rules 2025-01-08 11:47:35 +01:00