AquaFlameCMS / AquaFlameCMS_Trinity

AquaFlameCMS 1.5 aka CMS 1 is a free template with working PHP code + Forum for Private severs. It's a CMS for all your needs as an admin. Easy 2 Setup, Friendly with incredible support!
http://aquaflame.org
GNU General Public License v2.0
17 stars 43 forks source link

Register Rbac #3

Closed Zoldycks closed 11 years ago

Zoldycks commented 11 years ago

Hello Failzord, would be great if you implement the code for RBAC, the register also can give access to the RBAC database

New Source of Trinity Core has RBAC and records from their website can not connect to the database and give permissions RBAC.

FailZorD commented 11 years ago

Will need to check that.

oneluiz commented 11 years ago

it would have to add a line in config.php, to activate and deactivate + the edition of register.php this supports more than an emulator

ChazyTheBest commented 11 years ago

@FailZorD support rbac is very easy, is just one line. The problem i see is that you are not using PDO for mysql connections, so, for me, is more hard to make it. Anyways i was thinking in something like this:

$register_logon = mysql_query("INSERT INTO rbac_account_groups (accountId, groupId) SELECT `id` as latestid FROM `account` ORDER BY `joindate` DESC LIMIT 1 VALUES ("$lastid+1","1")");

Hope help, and please fix it soon.

FailZorD commented 11 years ago

We will make our Register Page RBAC supported when we will start the full implementation of PDO and OOP. Thanks for the thought and the share tho. We are glad to see people still interested for our Webs.

oneluiz commented 11 years ago

but it is better to wait and see with that surprises us @FailZorD XD

ChazyTheBest commented 11 years ago

realmid por defecto es -1, so no need. xD

oneluiz commented 11 years ago

$register_logon = mysql_query("INSERT INTO rbac_account_groups (groupId) VALUES ('1')")or die(mysql_error());

ALTER TABLE rbac_account_groups CHANGE accountId accountId INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Account id';

ChazyTheBest commented 11 years ago

Yeah, thats what i used :)

oneluiz commented 11 years ago

XD

Luis-Gomez commented 11 years ago

Any news about what's RBAC TrinityCore? Thanks

FailZorD commented 11 years ago

Will not be implemented yet.

Luis-Gomez commented 11 years ago

And a temporary solution

FailZorD commented 11 years ago

Such solution will not be made for now. We have a todo list that we are following. And RBAC is on the bottom, when all things are done, we will implement it. Till them you will have to wait. If someone wants to implement it we will be happy to add it to the main Repo. Even so you can make a poll request at: http://aquaflame.org/forum/index.php?/forum/3-suggestions/ If members will vote for it we will be glad to reply with it's immidiate fix.

oneluiz commented 11 years ago

i can implement a temporary solution while you get to that point?

FailZorD commented 11 years ago

We would be glad to see a Temporary fix.

oneluiz commented 11 years ago

RBAC solution https://github.com/AquaFlameCMS/AquaFlameCMS_Trinity/pull/15 this may be the ultimate solution to the RBAC AquaFlame, just needs a few tweaks “ereg is deprecated" It is time now to go migrating these old php functions to new and leave behind those features that are already obsolete. CMS contains old php functions as:

if(!eregi("^[_a-z0-9-]+(.[a-z0-9-]+)@[a-z0-9-]+(.[a-z0-9-]+)_(.[a-z]{2,4})$", $email)) {

for this one:

if(!pregmatch("/^([a-zA-Z0-9])+([a-zA-Z0-9.-])*@([a-zA-Z0-9-])+([a-zA-Z0-9.-]+)+$/", $email)) {

"ereg" and "eregi" is "preg_match ()" much to update on the CMS XD

Baeumchen commented 11 years ago

This can be closed now ^^

ChazyTheBest commented 11 years ago

TrinityCore RBAC tables have now a new structure, you should take a look at: https://github.com/TrinityCore/TrinityCore/commits/master