Yii Framework Forum: [module] userGroups - Yii Framework Forum

Jump to content

  • (10 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

[module] userGroups module for managing user, groups and their permissions Rate Topic: -----

#1 User is offline   nickcv 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 154
  • Joined: 23-November 10

Posted 30 March 2011 - 07:39 PM

i open this thread for comments and suggestions

you can find the module here
http://www.yiiframew...ion/usergroups/

if you need to report a bug do it in this thread or in the google code project page
http://code.google.c...ups/issues/list

current release 1.5 dropped support for Yii 1.1.6, and only supports 1.1.7
sometimes it's just like teaching pigs how to fly

Posted Image
Posted Image looking for some invite keys? welcome on B4K!
1

#2 User is offline   mucha1306 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 08-July 09
  • Location:Poland/Katowice

Posted 31 March 2011 - 02:43 AM

nice extension

adjust models/files naming. in windows its case sensitieve :)

Groups
Cron

thx
0

#3 User is offline   nickcv 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 154
  • Joined: 23-November 10

Posted 31 March 2011 - 03:21 AM

thanks!

Weird, i was sure i always used the right case when loading class files.

Tomorrow i'll run it on my case sensitive apache server and try it out.

Thanks a lot!
sometimes it's just like teaching pigs how to fly

Posted Image
Posted Image looking for some invite keys? welcome on B4K!
0

#4 User is offline   sagarneo11 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 30-March 11

Posted 31 March 2011 - 06:46 AM

Hi,

extention looks good but install page is not loading, getting following error is anyone will help me?


Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.
Error 404
192.168.1.98
3/31/2011 5:14:12 PM
Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1
0

#5 User is offline   nickcv 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 154
  • Joined: 23-November 10

Posted 31 March 2011 - 06:51 AM

right... i was just thinking about that... in the install instruction i made an assume that you were actually using urlManager with showScriptName setted to false and an .htaccess file


if you are not using .htaccess to get reed of index.php from your urls but you are still using urlManager this is the address where you are supposed to go:
yourapplication/index.php/userGroups

otherwise if you don't even have url manager active you are supposed to use the standard url definition that yii provides.
sometimes it's just like teaching pigs how to fly

Posted Image
Posted Image looking for some invite keys? welcome on B4K!
0

#6 User is offline   nickcv 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 154
  • Joined: 23-November 10

Posted 31 March 2011 - 07:05 AM

sagarneo11 i just added the instructions on how to enable urlManager inside the module page, use those.

if you still have some troubles let me know!
sometimes it's just like teaching pigs how to fly

Posted Image
Posted Image looking for some invite keys? welcome on B4K!
0

#7 User is offline   sagarneo11 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 30-March 11

Posted 31 March 2011 - 07:11 AM

Yes following code worked thank you again

		// uncomment the following to enable URLs in path-format
			'urlManager'=>array(
			'urlFormat'=>'path',
			'rules'=>array(
			  '<controller:\w+>/<id:\d+>'=>'<controller>/view',
			  '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
			  '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
			),
			'showScriptName'=>false,
		),

0

#8 User is offline   toplfx007 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 22
  • Joined: 30-November 10

Posted 09 April 2011 - 07:41 AM

Declaration of WebUserGroups::changeIdentity() should be compatible with that of CWebUser::changeIdentity()
0

#9 User is offline   julias 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 08-April 11
  • Location:Cape Town, South Africa

Posted 10 April 2011 - 05:30 AM

Hi, you seems to have built a very nice app here. Unfortunately for me i am having a few issues installing it. I get to the app installation page by typing "baseapp(DOT)local(slash)userGroups" and it appends the (slash)install. I continue to read instructions in install page and once i think everything is ok i enter my accessCode. I am then taken to the form for the root user which i fill in and on submition i get his error

  • include(UsergroupsCron[.]php): failed to open stream: No such file or directory


If i check the database i see 6 table have been created. but the only the usergroups_configuration table has records the other 5 are empty including the usergroups_user table. see error attached.

thanks for your help and once again, from documentation, this app look good.
Attached File  Screenshot-1.png (114.95K)
Number of downloads: 123
Attached File  Screenshot-2.png (143.96K)
Number of downloads: 107
Attached File  Screenshot-3.png (154.39K)
Number of downloads: 68
0

#10 User is offline   nickcv 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 154
  • Joined: 23-November 10

Posted 10 April 2011 - 05:55 AM

View Posttoplfx007, on 09 April 2011 - 07:41 AM, said:

Declaration of WebUserGroups::changeIdentity() should be compatible with that of CWebUser::changeIdentity()


the problem is i need to pass more arguments to the method so i don't see how to keep it compatible.

i could still pass the extra argument and use get arguments inside the changeidentity method but it would lose readability

View Postjulias, on 10 April 2011 - 05:30 AM, said:

Hi, you seems to have built a very nice app here. Unfortunately for me i am having a few issues installing it. I get to the app installation page by typing "baseapp(DOT)local(slash)userGroups" and it appends the (slash)install. I continue to read instructions in install page and once i think everything is ok i enter my accessCode. I am then taken to the form for the root user which i fill in and on submition i get his error

  • include(UsergroupsCron[.]php): failed to open stream: No such file or directory


If i check the database i see 6 table have been created. but the only the usergroups_configuration table has records the other 5 are empty including the usergroups_user table. see error attached.

thanks for your help and once again, from documentation, this app look good.
Attachment Screenshot-1.png
Attachment Screenshot-2.png
Attachment Screenshot-3.png



thanks for the bug report!
i'm testing everything on a no case sensitive file system, so i don't really get to spot those errors.

anyhow i'll make a new release right now, thanks again!

before running again the installation process delete the db tables created by the previous one
sometimes it's just like teaching pigs how to fly

Posted Image
Posted Image looking for some invite keys? welcome on B4K!
0

#11 User is offline   julias 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 08-April 11
  • Location:Cape Town, South Africa

Posted 11 April 2011 - 02:12 PM

View Postnickcv, on 10 April 2011 - 05:55 AM, said:

the problem is i need to pass more arguments to the method so i don't see how to keep it compatible.

i could still pass the extra argument and use get arguments inside the changeidentity method but it would lose readability




thanks for the bug report!
i'm testing everything on a no case sensitive file system, so i don't really get to spot those errors.

anyhow i'll make a new release right now, thanks again!

before running again the installation process delete the db tables created by the previous one


Thanks for the fix, its working great (well its passed the place i got the error and i have logged in for the first time). testing it now...
0

#12 User is offline   nickcv 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 154
  • Joined: 23-November 10

Posted 11 April 2011 - 02:15 PM

keep me updated :D
sometimes it's just like teaching pigs how to fly

Posted Image
Posted Image looking for some invite keys? welcome on B4K!
0

#13 User is offline   Petar 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 06-February 10

Posted 16 April 2011 - 07:22 AM

Nice extension!

bug report:
On page 'Root tools' ajax links 'add group' and 'add user' not work.

Original code:
// ../modules/userGroups/views/admin/groups.php, row 19
<?php
if (Yii::app()->user->pbac('userGroups.admin.admin'))
        echo CHtml::ajaxLink(Yii::t('userGroupsModule.admin', 'add group'), '/userGroups/admin/accessList?what='.UserGroupsAccess::GROUP.'&id=new', 
	array('success'=>'js: function(data){ $("#group-detail").slideUp("slow", function(){ $("#group-detail").html(data).slideDown();}); }'));
?>

//  ../modules/userGroups/views/admin/users.php, row 28
<?php
if (Yii::app()->user->pbac('userGroups.admin.admin')) 
	echo CHtml::ajaxLink(Yii::t('userGroupsModule.admin', 'add user'), '/userGroups/admin/accessList?what='.UserGroupsAccess::USER.'&id=new', 
	array('success'=>'js: function(data){ $("#user-detail").slideUp("slow", function(){ $("#user-detail").html(data).slideDown();}); }'),
	array('id'=>'new-user-'.time()));
?>


My solution:
//  ../modules/userGroups/views/admin/users.php
<?php
if (Yii::app()->user->pbac('userGroups.admin.admin')){	
	echo CHtml::ajaxLink(Yii::t('userGroupsModule.admin', 'add group'), 
	Yii::app()->createUrl('/userGroups/admin/accessList', array('what'=>UserGroupsAccess::GROUP, 'id'=>'new')), 
	array('success'=>'js: function(data){ $("#group-detail").slideUp("slow", function(){ $("#group-detail").html(data).slideDown();}); }'));}
?>

//  ../modules/userGroups/views/admin/users.php
<?php
if (Yii::app()->user->pbac('userGroups.admin.admin')) 
	echo CHtml::ajaxLink(Yii::t('userGroupsModule.admin', 'add user'), 
	Yii::app()->createUrl('/userGroups/admin/accessList', array('what'=>UserGroupsAccess::USER, 'id'=>'new')), 
	array('success'=>'js: function(data){ $("#user-detail").slideUp("slow", function(){ $("#user-detail").html(data).slideDown();}); }'),
	array('id'=>'new-user-'.time()));
?>





extension version: userGroups-1.6.2
0

#14 User is offline   nickcv 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 154
  • Joined: 23-November 10

Posted 17 April 2011 - 05:04 AM

thanks for the bug report Petar ^^

i'll make the correction tomorrow morning along a few others i have to.
sometimes it's just like teaching pigs how to fly

Posted Image
Posted Image looking for some invite keys? welcome on B4K!
0

#15 User is offline   Dave_D 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 28-April 11
  • Location:Surrey, England

Posted 30 April 2011 - 09:28 AM

Hi,

Just installed Usergroups on a completely empty project and got the following error (which I notice has been mentioned before)

Quote

Declaration of WebUserGroups::changeIdentity() should be compatible with that of CWebUser::changeIdentity()


I'm using yii 1.1.7 and userGroups 1.6.5.

I notice the following quote in the Docblock for CWebUser changeIdentity

Quote

Derived classes may override this method by retrieving additional user-related information. Make sure the parent implementation is called first.


could this have something to do with it??

Dave
0

#16 User is offline   Dave_D 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 28-April 11
  • Location:Surrey, England

Posted 30 April 2011 - 09:37 AM

Bad form to reply to own post but I've found the answer.

PHP reports this error if E_STRICT error reporting is switched on. It was reported as a bug (#46851) back in 2008 but is still knocking around

Dave
0

#17 User is offline   Dave_D 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 28-April 11
  • Location:Surrey, England

Posted 01 May 2011 - 04:36 PM

Hi,

As a newbie I'm probably trying to run before I can walk but I'm trying to add a profile extension and I get the following error:

Quote

UserController cannot find the requested view "//{{usergroups_userdata}}/index"


this is caused by line 28 of protected\modules\userGroups\views\user\_view.php which is:

Quote

$this->renderPartial('//'.$p['model']->tableName().'/'.$p['view'], array('model' => $p['model']));


I've created a table called usergroups_userdata and it's associated model; copied the public function profileViews() verbatim from the instructions into the model; created a view file 'index.php' in protected\views\usergroups_userdata and have added the 'profile' line to the usergroups configuration (which if commented out allows userGroups to run fine).

Yii 1.1.7, UserGroups 1.6.5, PHP 5.3.6

Help please

Dave
0

#18 User is offline   nickcv 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 154
  • Joined: 23-November 10

Posted 02 May 2011 - 02:32 AM

please copy your model into paste bin and post here the link so i can check it out ^^
sometimes it's just like teaching pigs how to fly

Posted Image
Posted Image looking for some invite keys? welcome on B4K!
0

#19 User is offline   Dave_D 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 28-April 11
  • Location:Surrey, England

Posted 02 May 2011 - 03:45 AM

View Postnickcv, on 02 May 2011 - 02:32 AM, said:

please copy your model into paste bin and post here the link so i can check it out ^^


Hope this is what you want. zipped up model attached

Thanks

Dave

Attached File(s)


0

#20 User is offline   nickcv 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 154
  • Joined: 23-November 10

Posted 02 May 2011 - 03:59 AM

ok found the problem, thanks Dave_D ^^

i'll release a bugfix within today.

what's going on is that the module use the tableName to get the view directory, and is not taking count of the { }
sometimes it's just like teaching pigs how to fly

Posted Image
Posted Image looking for some invite keys? welcome on B4K!
0

Share this topic:


  • (10 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users