Coder Social home page Coder Social logo

Username should be unique about mamute HOT 11 CLOSED

leocwolter avatar leocwolter commented on August 12, 2024
Username should be unique

from mamute.

Comments (11)

csokol avatar csokol commented on August 12, 2024

Why?

Chico Sokol

On Thu, Aug 21, 2014 at 12:52 PM, Leonardo Cesar Wolter <
[email protected]> wrote:

From now, the field username of the model User should be unique and not
case sensitive.
If there's a user called 'leonardo.wolter', no one can create a user
called 'Leonardo.wolter'


Reply to this email directly or view it on GitHub
#46.

from mamute.

leocwolter avatar leocwolter commented on August 12, 2024

We are having issues at guj.com where a troll is creating multiple fake users with the username of other users http://www.guj.com.br/26754-ignorem-e-apenas-um-troll

from mamute.

csokol avatar csokol commented on August 12, 2024

:-(

Right, we will have to do some manual work to fix this when we deploy our
new version.

Chico Sokol

On Thu, Aug 21, 2014 at 1:18 PM, Leonardo Cesar Wolter <
[email protected]> wrote:

We are having issues at guj.com where a troll is creating multiple fake
users with the username of other users
http://www.guj.com.br/26754-ignorem-e-apenas-um-troll


Reply to this email directly or view it on GitHub
#46 (comment).

from mamute.

leocwolter avatar leocwolter commented on August 12, 2024

I guess we can just validate the new users from now

from mamute.

defaultbr avatar defaultbr commented on August 12, 2024

Yes, validate new users will be enough (case insensitive)

from mamute.

monitorjbl avatar monitorjbl commented on August 12, 2024

Looks like this commit broke a bunch of test cases: https://travis-ci.org/caelum/mamute/builds/33532614.

from mamute.

monitorjbl avatar monitorjbl commented on August 12, 2024

This is partially my fault, in implementing #37 I included a default mamute.database value in the POM. When you renamed the test/hibernate-mysql.cfg.xml back to test/hibernate.cfg.xml, the value was left in the POM and it's still trying to load hibernate-mysql.cfg.xml.

Delete line 15 in the POM and it should be fixed.

from mamute.

leocwolter avatar leocwolter commented on August 12, 2024

This is weird, I could run the tests using eclipse. Maybe it will only fail when using mvn tests once the value is on pom, right?

I think the best would be putting it at mamute.properties

from mamute.

monitorjbl avatar monitorjbl commented on August 12, 2024

I've long since stopped trying to understand Eclipse's weirdness :) I'm able to replicate Travis's results by running mvn clean package from the command line. Does master still build for you from the command line?

from mamute.

leocwolter avatar leocwolter commented on August 12, 2024

I fixed it with this: 05b2bb1 It was the best I could do from github, but we should move the pom value to mamute.properties to prevent this kind of weirdness :)

from mamute.

monitorjbl avatar monitorjbl commented on August 12, 2024

The idea at the time was that you could run mvn clean package -Dmamute.database=h2 and choose to build testing against the H2 database instead of MySQL. The problem that you ran into was that there was a default value of mysql for that property in the POM at line 15. Removing the line would have made the default value null so the default file would have been used.

Changing this to be a path to a Hibernate config file would make the code cleaner. I also think putting it in mamute.properties would work, but there's the issue of how to change it at build time so you can test other DBs. Can you have Maven do resource filtering to set the properties file? Maybe have line like this?

mamute.hibernateCfg=${mamute.hibernateCfg}

from mamute.

Related Issues (20)

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.