GithubHelp home page GithubHelp logo

revel / modules Goto Github PK

View Code? Open in Web Editor NEW
49.0 15.0 48.0 363 KB

Officially supported Revel modules

Home Page: http://revel.github.io/modules/

License: MIT License

Go 88.25% HTML 10.74% CSS 1.01%
revel module crsf jobs testrunnerswitcher pprof hacktoberfest

modules's Introduction

Revel Framework

Build Status License Go Report Card

A high productivity, full-stack web framework for the Go language.

Current Version: 1.1.0 (2022-04-11)

Supports go.mod package management

Quick Start

Install Revel:

go install github.com/revel/cmd/revel@latest

Create & Run your app:

revel new -a my-app -r

Open http://localhost:9000 in your browser and you should see "It works!"

Community

Learn More

Contributing

Contributors

modules's People

Contributors

arrayarray avatar brendensoares avatar corgrath avatar dependabot[bot] avatar jeevatkm avatar joealcorn avatar jwcn avatar k3a avatar liilac avatar ninavdl avatar ninov avatar notzippy avatar obitux avatar olivierlemasle avatar pedromorgan avatar pkuca avatar ptman avatar pushrax avatar shawncatz avatar verdverm avatar wariosolis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

modules's Issues

Support Casbin as the authorization (AuthZ) module

Hi, Casbin is an authorization library that supports models like ACL, RBAC, ABAC.

Related to RBAC, Casbin has several advantages:

  1. roles can be cascaded, aka roles can have roles.
  2. support resource roles, so users have their roles and resource have their roles too. role = group here.
  3. the permission assignments (or policy in Casbin's language) can be persisted in files or database (MySQL and Cassandra).

And you can even customize your own access control model, for example, mix RBAC and ABAC together by using roles and attributes at the same time. It's very flexible.

Casbin can provide more flexibility and security in authorization for Revel. So I'd like to add it to this modules repo. What do you think? Let me know if there's any question:) Thanks.

Qr Code Gen

I've basically got this working, on a RL application in a warehouse

Its atmo 2 parts..

  1. the image params as input
  2. the image gen

Problem is making a good interface..

pprof.Trace() does not implemented golang v1.4.2

pprof.Trace() seems to be not implemented yet v1.4.2 (pprof)

so when use this module, I got error below

github.com/revel/modules/pprof/app/controllers/pprof.go:34: undefined: "net/http/pprof".Trace

pprof.Trace() is merged on Jan 29, 2015
It is convenient to remove PprofHandler.Trace() untill this feature supported on the next stable Go version (v1.4.3 or v1.5?).

CSV

Serialise using csv format + array

[orm/gorm] Allow configuration of singulartable

I'm using DB.SingularTable(true) but I have to use this code within every function of my controllers.
I didn't find a general place to set this value and I'd expect it to be configurable using the app.conf file.

Would it be possible to add a new configuration attribute? e.g. 'db.singulartable', so there is a general and unique place where this can be configured.

REVEL CSRF: Same origin mismatch.

I'm not sure if it's because of running behind a proxy or not, but with some logging just after

isSameOrigin := sameOrigin(c.Request.URL, referer)
:

sameorigin=false referer=https://dev.carecode.net/ url=/

Clearly the test will fail with those inputs:

	return u1.Scheme == u2.Scheme && u1.Host == u2.Host

Something isn't working. I see that the logic is a bit different from cbonello/revel-csrf

Revel throws panic when i enable jobs.

INFO 2017/05/01 18:51:12 main.go:32: Running revel server
panic: reflect: call of reflect.Value.Type on zero Value

goroutine 1 [running]:
panic(0xbd1b00, 0xc4201e7c20)
/usr/local/go/src/runtime/panic.go:500 +0x1a1
reflect.Value.Type(0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/reflect/value.go:1670 +0x224
github.com/company/project/vendor/github.com/revel/revel.findControllers(0x137d2c0, 0xcaba60, 0xc4202a26e0, 0x4, 0x10)
/root/git/go/src/github.com/company/project/vendor/github.com/revel/revel/controller.go:329 +0x9f2
github.com/company/projectvendor/github.com/revel/revel.RegisterController(0xca73e0, 0x0, 0xc420028118, 0x1, 0x1)
/root/git/go/src/github.com/company/project/vendor/github.com/revel/revel/controller.go:414 +0x219
main.main()
/root/git/go/src/github.com/company/project/web/app/tmp/main.go:90 +0xbd0

The second I disable the module.jobs line in app.conf revel works fine.

Move db and csrf into revel/revel

This goal is make these modules as part revel core codebase-

  • Move db module into revel/revel
  • First fix #17 csrf and move csrf module into revel/revel

_csrftoken missing from RenderArgs

When trying to put the csrf token in a form with {{ csrftoken . }} I get:

Template Execution Panic in App/Index.html:
REVEL CSRF: _csrftoken missing from RenderArgs.

Here is my list of filters:

revel.Filters = []revel.Filter{
        revel.PanicFilter,             // Recover from panics and display an error page instead.
        revel.RouterFilter,            // Use the routing table to select the right Action
        revel.FilterConfiguringFilter, // A hook for adding or removing per-Action filters.
        revel.ParamsFilter,            // Parse parameters into Controller.Params.
        revel.SessionFilter,           // Restore and write the session cookie.
        csrf.CsrfFilter,               //-- Cross site Forgery protection
        revel.FlashFilter,             // Restore and write the flash cookie.
        revel.ValidationFilter,        // Restore kept validation errors and save new ones from cookie.
        revel.I18nFilter,              // Resolve the requested language
        HeaderFilter,                  // Add some security based headers
        revel.InterceptorFilter,       // Run interceptors around the action.
        revel.CompressFilter,          // Compress the result.
        revel.ActionInvoker,           // Invoke the action.
    }

Create test cases to help unit testing CSRF module

In order to do form posting you must pass the csrf value back to the server. This request is to create a helper test case to perform this. Simply extending the existing testcases and adding a CSRForm post method should suffice.

See #83

`revel test` should return a non-zero exit code on test failure

I'm trying to use travis to test my project which will run both my Go tests and Revel tests. However revel test will always return exit code 0, even if the tests fail. This makes it difficult to incorporate into automated testing scripts.

My current workaround is to do revel test 2>1 | grep -e "All Tests Passed." which returns 0 if it matches the text, or 1 otherwise. However this means that grep swallows the output and I can't see what actually failed. This turns into a mess of writing the log to a file, checking the file, printing log output if it's not found, etc.

Non-zero exit codes on test failure are typically the norm for automated test runners.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.