Loading README.md +7 −6 Original line number Diff line number Diff line # IA2 GMS ## MySQL setup ## Database Docker image ``` create database gms; create user gms@localhost identified by 'gms'; grant all privileges on gms.* to gms@localhost; To build the image run **from current directory**: ``` docker build -f database/Dockerfile --tag gms-db . To start the image and use the database: docker run -d -p 5432:5432 -i -t gms-db:latest database/Dockerfile +2 −1 Original line number Diff line number Diff line FROM library/postgres:11 COPY ../gms/src/main/resources/sql/init.sql /docker-entrypoint-initdb.d/ COPY gms/src/main/resources/sql/init.sql /docker-entrypoint-initdb.d/ COPY database/user.sql /docker-entrypoint-initdb.d/ database/user.sql 0 → 100644 +4 −0 Original line number Diff line number Diff line CREATE ROLE gms WITH LOGIN PASSWORD 'gms'; GRANT USAGE ON SCHEMA public TO gms; GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO gms; GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO gms; No newline at end of file gms-ui/src/components/GroupsPanel.vue +1 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ <b-list-group v-for="group in model.groupsPanel.items"> <b-list-group-item href="#" v-on:click="openGroup(group)"> <span class="float-left">{{group.groupName}}</span> <span v-if="group.permissions.includes('ADMIN')" class="float-right"> <span v-if="group.permission === 'ADMIN'" class="float-right"> <a href="#" v-on:click.stop="openRenameGroupModal(group)" title="Rename"> <font-awesome-icon icon="edit"></font-awesome-icon> </a> Loading gms-ui/src/components/Main.vue +4 −4 Original line number Diff line number Diff line Loading @@ -40,10 +40,10 @@ export default { }, computed: mapState({ model: state => state.model, showAddMemberBtn: state => state.model.permissions.includes('ADMIN') && state.input.selectedTab === 'members', showAddCollaboratorBtn: state => state.model.permissions.includes('MANAGE_MEMBERS') && state.input.selectedTab === 'members', showAddGroupBtn: state => state.model.permissions.includes('ADMIN') && state.input.selectedTab === 'groups', showAddPermissionBtn: state => state.model.permissions.includes('ADMIN') && state.input.selectedTab === 'permissions' showAddMemberBtn: state => state.model.permission === 'ADMIN' && state.input.selectedTab === 'members', showAddCollaboratorBtn: state => state.model.permission === 'MANAGE_MEMBERS' && state.input.selectedTab === 'members', showAddGroupBtn: state => state.model.permission === 'ADMIN' && state.input.selectedTab === 'groups', showAddPermissionBtn: state => state.model.permission === 'ADMIN' && state.input.selectedTab === 'permissions' }), methods: { tabChanged: function(tabIndex) { Loading Loading
README.md +7 −6 Original line number Diff line number Diff line # IA2 GMS ## MySQL setup ## Database Docker image ``` create database gms; create user gms@localhost identified by 'gms'; grant all privileges on gms.* to gms@localhost; To build the image run **from current directory**: ``` docker build -f database/Dockerfile --tag gms-db . To start the image and use the database: docker run -d -p 5432:5432 -i -t gms-db:latest
database/Dockerfile +2 −1 Original line number Diff line number Diff line FROM library/postgres:11 COPY ../gms/src/main/resources/sql/init.sql /docker-entrypoint-initdb.d/ COPY gms/src/main/resources/sql/init.sql /docker-entrypoint-initdb.d/ COPY database/user.sql /docker-entrypoint-initdb.d/
database/user.sql 0 → 100644 +4 −0 Original line number Diff line number Diff line CREATE ROLE gms WITH LOGIN PASSWORD 'gms'; GRANT USAGE ON SCHEMA public TO gms; GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO gms; GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO gms; No newline at end of file
gms-ui/src/components/GroupsPanel.vue +1 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ <b-list-group v-for="group in model.groupsPanel.items"> <b-list-group-item href="#" v-on:click="openGroup(group)"> <span class="float-left">{{group.groupName}}</span> <span v-if="group.permissions.includes('ADMIN')" class="float-right"> <span v-if="group.permission === 'ADMIN'" class="float-right"> <a href="#" v-on:click.stop="openRenameGroupModal(group)" title="Rename"> <font-awesome-icon icon="edit"></font-awesome-icon> </a> Loading
gms-ui/src/components/Main.vue +4 −4 Original line number Diff line number Diff line Loading @@ -40,10 +40,10 @@ export default { }, computed: mapState({ model: state => state.model, showAddMemberBtn: state => state.model.permissions.includes('ADMIN') && state.input.selectedTab === 'members', showAddCollaboratorBtn: state => state.model.permissions.includes('MANAGE_MEMBERS') && state.input.selectedTab === 'members', showAddGroupBtn: state => state.model.permissions.includes('ADMIN') && state.input.selectedTab === 'groups', showAddPermissionBtn: state => state.model.permissions.includes('ADMIN') && state.input.selectedTab === 'permissions' showAddMemberBtn: state => state.model.permission === 'ADMIN' && state.input.selectedTab === 'members', showAddCollaboratorBtn: state => state.model.permission === 'MANAGE_MEMBERS' && state.input.selectedTab === 'members', showAddGroupBtn: state => state.model.permission === 'ADMIN' && state.input.selectedTab === 'groups', showAddPermissionBtn: state => state.model.permission === 'ADMIN' && state.input.selectedTab === 'permissions' }), methods: { tabChanged: function(tabIndex) { Loading