Skip to content
Permalink
Browse files

ATLAS-166: Allow more than own owner for a marker

  • Loading branch information...
HelioStrike committed Jul 15, 2019
1 parent b9bc88f commit 956dbbe2c88471e8b8e9329c491771f468dbc590
Showing with 814 additions and 148 deletions.
  1. +12 −10 Dockerfile
  2. +32 −0 db/auth_on_delete_cascade.sql
  3. +1 −1 db/bootstrap.sql
  4. +370 −12 package-lock.json
  5. +1 −0 package.json
  6. +10 −0 public/css/atlas.css
  7. +36 −21 public/js/atlas.js
  8. +119 −4 public/js/user.js
  9. +109 −0 routes/auth.js
  10. +1 −0 routes/index.js
  11. +110 −100 routes/markers.js
  12. +12 −0 utils.js
  13. +1 −0 views/index.ejs
@@ -1,11 +1,13 @@
FROM node:8-alpine
FROM node:8-jessie

COPY . /app

WORKDIR /app

RUN apt-get update && \
npm install --only=production && \
chmod a+x /app/docker/entrypoint.sh

EXPOSE 3000
WORKDIR /
COPY . /
RUN apk add --update \
bash \
curl \
&& rm -rf /var/cache/apk/*
RUN npm install --only=production
RUN chmod a+x /docker/entrypoint.sh
CMD ["/docker/entrypoint.sh"]

CMD ["/app/docker/entrypoint.sh"]
@@ -0,0 +1,32 @@
-- MySQL dump 10.13 Distrib 5.6.39, for Linux (x86_64)
--
-- Host: localhost Database: atlasdb
-- ------------------------------------------------------
-- Server version 5.6.39

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

-- Add ON DELETE CASCADE to auth's auth_atlas_id_foreign key
ALTER TABLE `auth` DROP FOREIGN KEY `auth_atlas_id_foreign`;
ALTER TABLE `auth` ADD CONSTRAINT `auth_atlas_id_foreign` FOREIGN KEY (`atlas_id`) REFERENCES `atlas`(`id`) ON DELETE CASCADE;

/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2018-04-08 7:53:27
@@ -117,7 +117,7 @@ CREATE TABLE `auth` (
`expires` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `auth_atlas_id_foreign` (`atlas_id`),
CONSTRAINT `auth_atlas_id_foreign` FOREIGN KEY (`atlas_id`) REFERENCES `atlas` (`id`)
CONSTRAINT `auth_atlas_id_foreign` FOREIGN KEY (`atlas_id`) REFERENCES `atlas` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=509 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

0 comments on commit 956dbbe

Please sign in to comment.
You can’t perform that action at this time.