Displaying 20 results from an estimated 3000 matches similar to: "role-based conditionals"
2006 Jul 16
9
acl_system help is needed
i found Ezra''s acl_system plugin yesterday and i am trying to figure it
out.
based on the simple instructions on the site, it does exactly what i
need but i''m getting some errors when i try to use it:
NoMethodError in UsersController#index
You have a nil object when you didn''t expect it!
The error occured while evaluating nil.roles
i am pretty new to rails and
2006 Mar 06
20
How painful is the 1.0 -> 1.1 upgrade going to be?
Does anyone have a sense for how painful the 1.0 -> 1.1 upgrade is
going to be for existing apps? I''m finishing up my first real RoR
application with Rails 1.0. I can live with it staying at that level,
but I really want to use the has_many :through attribute to clean up
some of my code.
I''m not particularly interested in edge Rails, mainly because the
documentation for
2007 Aug 11
2
Rspec and acl_system2 plugin
Hello,
I''m trying to spec a Rails application using the couple
restful_authentication/acl_system2 plugins.
In my admin layout, I put the following code :
<% restrict_to "admin" do -%>
<ul id="admin-tabs">
<li> /users Users management </li>
</ul>
<% end -%>
Then in my spec file
2006 Jul 14
4
sending additional parameters to before_filter
i am trying to create a system so that different users have different
priviliges on my application. i was going to modify my authorize
function so that i could pass the required role to it and have it check
the current user for that role.
i am using before_filter and would like to have just one function
instead of writing one for each role like so:
authorize(role)
instead of:
2007 Oct 18
0
ACL System restrict_to
Does the restrict_to method only work in the views for some reason? I
have tried it in the controller and i get the "undefined local variable
or method `restrict_to'' for Admin::SurveysController:Class" Ive even
copied the code from the access_control.rb in the plugin to the
application_helper but it still keeps giving the same error.
def restrict_to(logicstring, context = {})
2006 Jun 07
7
file_column image versions
does anyone know much about resizing different versions of images with
file_column? i tried it and everything works fine, but my question is
can you do more than just make sizes with a version of image? i''m
working on a photo album and i would like to resize the image to a
medium size, but create a thumbnail as well and crop anything left to
make the thumbnail a perfect square.
--
2006 Aug 04
3
forms and relationships
i''m still pretty new to rails, and while i''ve been able to hack my way
into having it do what i want so far, i''m not happy with the way my code
looks. on top of that, i''m sure that what i''m doing prlly isn''t the most
efficient either.
one of my biggest problems is probably to do with using relationships
and forms together. i''ve
2006 Jul 05
5
ok, lightTPD is installed... how do i use it.
i used the hivelogic article to install ruby on rails to my mac:
http://hivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger
everything works great using the script/server command, but isn''t that
still using WEBrick? how do i server my apps with lightTPD?
i tried following the instructions given here:
http://duncandavidson.com/essay/2005/12/railsonlighty
but have had no
2006 Jun 20
5
ActionMailer to send to multiple people
I''ve been working with ActionMailer for a few days and finally have a
pretty good grasp of it. In the book I''m reading, it shows how to send
to multiple users or an array of users.
Is there a setting or some configuration I can do to send the email to
each person separately, or would I just need to loop through each user
and send one email at a time?
What is the best way to
2006 Apr 28
5
please explain web services
could someone explain some of the uses for a web service. i''m reading
about how to make them, but i''m still not quite sure what they''re good
for.
i have multiple rails apps that i would like to pass user information
back and forth to. i''m not sure if something like this could help me or
not.
thanks
--
Posted via http://www.ruby-forum.com/.
2017 Dec 05
2
MMC issue
Hi
I have a strange problem with Shared folders in MMC. While I try to connect
to linux machine and list Open files or Sessions I got a message "You do not
have permission to view the list of sessions from Windows clients".
The problem exists only if I try to connect to linux machines (Windows
Server is ok),
and only for Administrator account. From other accounts with Administrator
2006 Jul 15
4
learning from typo.
i have a copy of the typo source on my desktop that i am going through
just to get a better understanding of the rails framework and ruby
itself. i''m fairly new to everything so it has proved to be very helpful
and very inspiring.
i''m stuck on a part though. i was trying to figure out how everything on
the sidebar works. i found the components folder and started looking
2006 Apr 28
2
["acts_as_authenticated"] << "Role-Based Authorization Rails Recipe"
hi guys,
has anyone here implemented role based authorization from rails recipes
into acts_as_authenticated ? how''s it going?
Case:
there is ONE admin. And MANY users. Admin is the only one who can
create, edit, delete user, etc.. users also need to login, but go to
different pages. do you guys think it''s good to try rick''s
acts_as_authenticated + chad''s
2006 Jun 06
3
help with date formats
i have a datetime field in my database that i need broken up. i want to
display the date and the time in separate places. i tried looking
through the api, but couldn''t find what i was looking for.
if someone could please point me in the right direction to format dates,
that would be great. thanks
--
Posted via http://www.ruby-forum.com/.
2007 Mar 06
15
mocking missing methods
Hi folks.
So I''m using mocha on a ruby project, and I really like it. One thing
I''ve noticed is that it can be a bit "surprising" when I''m mocking
methods that don''t exist on an object, and I think there''s an easyish fix.
At the moment, you use sheep = mock() to create a mock sheep. What I''d
like to do is something like sheep =
2006 Feb 23
13
Check if a saved user''s name is admin
Hi all,
I have a question about this method in my User model:
# Returns true for the (saved) user called "admin"
def is_the_administrator
true if save and name == "admin"
end
The method returns true if the user''s name is admin. However, I only want to
return true if the state of the object is "saved", so I call the save method
first.
I''m
2007 Jul 06
3
stubbing helper methods for View specs
Hi there
I have several view specs, that include the following snippet in
their "before" block to stub the methods by acts_as_authenticated
before :each do
@u = mock_model(User)
@u.should_receive(:name).and_return("Hans Muster")
template.should_receive(:logged_in?).and_return(true)
template.should_receive(:current_user).and_return(@u)
end
this
2002 Jun 12
1
Ldap and "domain admin group"
Hi,
I have tried to add a user (not a group) to "domain admin group" in
smb.conf with no success. If i use the usermanager an check the
Administrators group on the local machine there are two members,
Administrator and DOMAIN\unix_group.2147483404 and the user does NOT
get administrative priviliges on the local machine. If I add the
user to the Administrators group on the local machine
2004 Nov 23
1
Samba + CFS
Hello,
I'm trying to get Samba and CFS (cryptographic file system) to work.
What I want is to mount a crypted directory (on my Debian Sarge server) as
a Samba share to my WinXP box.
I've already set up a crypted directory (/crypt/crypt) as a user. And I've
also set up a Samba share for this 'virtual' directory.
I can access and delete files from that folder over the Samba
2013 Mar 20
1
Making users local administrators
I have Samba 4 (lastest version, I think) set up for Active Driectory.
Everything is working just, using Microsoft's Group Policy Editor to manage
stuff. Except one thing:
For reasons you don't want to get me started on, I need all users to have
local administrative priviliges on any computer on the domain. This is
supposed to be a simple, straightforward thing. Google has led me to