https://github.com/kir-dev/sch-pincer
Közös rendelő oldal a Schönherz Kollégium lakói számára
https://github.com/kir-dev/sch-pincer
kotlin spring-boot
Last synced: 5 months ago
JSON representation
Közös rendelő oldal a Schönherz Kollégium lakói számára
- Host: GitHub
- URL: https://github.com/kir-dev/sch-pincer
- Owner: kir-dev
- Created: 2019-12-05T18:14:08.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2026-01-11T12:09:49.000Z (5 months ago)
- Last Synced: 2026-01-11T16:41:11.062Z (5 months ago)
- Topics: kotlin, spring-boot
- Language: Kotlin
- Homepage: https://schpincer.sch.bme.hu/
- Size: 6.48 MB
- Stars: 12
- Watchers: 2
- Forks: 2
- Open Issues: 32
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SCH-PINCÉR
Food ordering website for the Schönherz Dormitory
## Running/debugging locally
- Open the repository in IntelliJ IDEA
- Create a database with this query: `CREATE DATABASE schpincer;`
- Go to https://auth.sch.bme.hu/console/create, set *Átirányítási cím* to
`http://localhost:8080/login/oauth2/code/authsch`, then use the created credentials in the following config file:
- Create `src/main/resources/config/application-local.properties` using the below config and update it with your AuthSCH credentials:
```properties
spring.security.oauth2.client.registration.authsch.client-id=AUTHSCHKLIENSAZONOSITO
spring.security.oauth2.client.registration.authsch.client-secret=AUTHSCHKLIENSKULCS
# use "create" to reset the database when restarting the server
spring.jpa.hibernate.ddl-auto=update
# *Enable debug output* in the IntelliJ *Run/Debug Configuration* under
# *Modify options* also prints SQL commands that were run.
#spring.jpa.show-sql=true
```
- Ensure that the `local` profile is set in *Run/Debug Configurations* / *SchpincerApp* / *Active profiles:*
- Press *Debug 'SchpincerApp'*. Open http://localhost:8080
- Enable the `test` profile to insert demo data into the database
### Grant admin privilege via SQL queries
- Open postgres console and select your database
- Make sure you've logged in at least once
- Use eg. this query to grant yourself sysadmin, or set `schincer.sysadmin=YOUR_AUTHSCH_UUID` in your `application-local.properties`
```sql
UPDATE `users` SET `sysadmin`=1 WHERE `email`='YOUR_EMAIL';
```
- Relog (log out and in)
- You will now see the two administration buttons