Search Results

Search found 5086 results on 204 pages for 'smtp permission'.

Page 100/204 | < Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >

  • Android, how to use DexClassLoader to dynamically replace an Activity or Service

    - by RickNotFred
    I am trying to do something similar to this stackoverflow posting. What I want to do is to read the definition of an activity or service from the SD card. To avoid manifest permission issues, I create a shell version of this activity in the .apk, but try to replace it with an activity of the same name residing on the SD card at run time. Unfortunately, I am able to load the activity class definition from the SD card using DexClassLoader, but the original class definition is the one that is executed. Is there a way to specify that the new class definition replaces the old one, or any suggestions on avoiding the manifest permission issues without actually providing the needed activity in the package? The code sample: ClassLoader cl = new DexClassLoader("/sdcard/mypath/My.apk", getFilesDir().getAbsolutePath(), null, MainActivity.class.getClassLoader()); try { Class<?> c = cl.loadClass("com.android.my.path.to.a.loaded.activity"); Intent i = new Intent(getBaseContext(), c); startActivity(i); } catch (Exception e) { Intead of launching the com.android.my.path.to.a.loaded.activity specified in /sdcard/mypath/My.apk, it launches the activity statically loaded into the project.

    Read the article

  • Difference in regex between Python and Rubular?

    - by Rosarch
    In Rubular, I have created a regular expression: (Prerequisite|Recommended): (\w|-| )* It matches the bolded: Recommended: good comfort level with computers and some of the arts. Summer. 2 credits. Prerequisite: pre-freshman standing or permission of instructor. Credit may not be applied toward engineering degree. S-U grades only. Here is a use of the regex in Python: note_re = re.compile(r'(Prerequisite|Recommended): (\w|-| )*', re.IGNORECASE) def prereqs_of_note(note): match = note_re.match(note) if not match: return None return match.group(0) Unfortunately, the code returns None instead of a match: >>> import prereqs >>> result = prereqs.prereqs_of_note("Summer. 2 credits. Prerequisite: pre-fres hman standing or permission of instructor. Credit may not be applied toward engi neering degree. S-U grades only.") >>> print result None What am I doing wrong here?

    Read the article

  • Does anyone know why my maps only show grid

    - by NickTFried
    I've doubled checked my API key is right and that is right I doubled checked that it was correct. Here is my source and XML could anyone check to see what is wrong. Also I make sure I have internet. <?xml version="1.0" encoding="utf-8"?> <uses-permission android:name="android.permissions.INTERNET"/> <uses-permission android:name="android.permissions.ACCESS_FINE_LOCATION"/> <application android:icon="@drawable/icon" android:label="@string/app_name"> <uses-library android:name="com.google.android.maps" /> <activity android:name=".CadetCommand" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name="RedLight"></activity> <activity android:name="PTCalculator"></activity> <activity android:name="LandNav"></activity> </application> <uses-sdk android:minSdkVersion="4"/> package edu.elon.cs.mobile; import com.google.android.maps.MapActivity; import com.google.android.maps.MapView; import android.os.Bundle; public class LandNav extends MapActivity{ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.landnav); } @Override protected boolean isRouteDisplayed() { return false; } }

    Read the article

  • Problem when get pageContent of URL in java ?

    - by tiendv
    Hi all ! i have a code for get pagecontent from a URL here is code ! import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; import java.net.URLConnection; public class GetPageFromURLAction extends Thread { public String stringPageContent; public String targerURL; public String getPageContent(String targetURL) throws IOException { String returnString=""; URL urlString = new URL(targetURL); URLConnection openConnection = urlString.openConnection(); String temp; BufferedReader in = new BufferedReader(new InputStreamReader(openConnection.getInputStream())); while ((temp = in.readLine()) != null) { returnString += temp + "\n"; } in.close(); // String nohtml = sb.toString().replaceAll("\\<.*?>",""); return returnString; } public String getStringPageContent() { return stringPageContent; } public void setStringPageContent(String stringPageContent) { this.stringPageContent = stringPageContent; } public String getTargerURL() { return targerURL; } public void setTargerURL(String targerURL) { this.targerURL = targerURL; } @Override public void run() { try { this.stringPageContent=this.getPageContent(targerURL); } catch (IOException e) { e.printStackTrace(); } } } The problem is : 1 Some time i receive a error lik 405 ,or 403 HTTP error ... and result string is null . To repair i check permission to connect URL but it usualy return null URLConnection openConnection = urlString.openConnection(); openConnection.getPermission( ) is mean that i don't have permission to acess link ? To get resultString without HTML Tag ? i do like that String nohtml = sb.toString().replaceAll("\<.*?",""); Para sb is Stringbulder , but it can't remove all HTML Tab in string return ? I use thread here because i must get page alot of url , so how can i cread a multi thread to impro speed of program ! Thanks

    Read the article

  • Getting base address of a process

    - by yoni0505
    I'm trying to make a program that read the timer value from Minesweeper. (OS is windows 7 64bit) Using cheat engine I found the base address of the variable, but it changes every time I run Minesweeper. What do I need to do to find out the base address automatically? Does it have something to do with the executable base address? Here's my code: #include <windows.h> #include <iostream> using namespace std; int main() { DWORD baseAddress = 0xFF1DAA38;//always changing DWORD offset1 = 0x18; DWORD offset2 = 0x20; DWORD pAddress1; DWORD pAddress2; float value = 0; DWORD pid; HWND hwnd; hwnd = FindWindow(NULL,"Minesweeper"); if(!hwnd)//didn't find the window { cout <<"Window not found!\n"; cin.get(); } else { GetWindowThreadProcessId(hwnd,&pid); HANDLE phandle = OpenProcess(PROCESS_VM_READ,0,pid);//get permission to read if(!phandle)//failed to get permission { cout <<"Could not get handle!\n"; cin.get(); } else { ReadProcessMemory(phandle,(void*)(baseAddress),&pAddress1,sizeof(pAddress1),0); ReadProcessMemory(phandle,(void*)(pAddress1 + offset1),&pAddress2,sizeof(pAddress2),0); while(1) { ReadProcessMemory(phandle,(void*)(pAddress2 + offset2),&value,sizeof(value),0); cout << value << "\n"; Sleep(1000); } } } }

    Read the article

  • jQuery: How would I show/hide these elements?

    - by Shpigford
    Here's my HTML: <ul> <li> <p><label><input type="checkbox" name="permission" value="1" class="permission_check" checked> Joe Schmoe</label></p> <p class="radio_option"><label><input type="radio" name="viewpromote" value="1"> View and Promote</label></p> <p class="radio_option"><label><input type="radio" name="createedit" value="1" checked> ...plus Create and Edit</label></p> </li> <li> <p><label><input type="checkbox" name="permission" value="1" class="permission_check" checked> Bob Smith</label></p> <p class="radio_option"><label><input type="radio" name="viewpromote" value="1" checked> View and Promote</label></p> <p class="radio_option"><label><input type="radio" name="createedit" value="1"> ...plus Create and Edit</label></p> </li> </ul> What I need to do is when a user checks/unchecks the permission_check input, then it should show/hide the radio_option elements for that list item.

    Read the article

  • Android Maps: Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY

    - by AP257
    I'm trying to use Android Maps, following the instructions in Hello MapView. I've added <uses-library android:name="com.google.android.maps" /> in the Manifest, and I'm building against the 'Google APIs' target, which claims to be API version 7. So I don't think I'm doing anything obviously wrong, but the project refuses to build with this error: [2010-12-22 13:34:32 - FMS]Installing FMS.apk... [2010-12-22 13:35:01 - FMS]Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY [2010-12-22 13:35:01 - FMS]Please check logcat output for more details. [2010-12-22 13:35:01 - FMS]Launch canceled! logcat is telling me the following (not very enlightening): D/PackageParser( 55): Scanning package: /data/app/vmdl67147.tmp I/PackageParser( 55): com.android.fms: compat added android.permission.WRITE_EXTERNAL_STORAGE android.permission.READ_PHONE_STATE E/PackageManager( 55): Package com.android.fms requires unavailable shared library com.google.android.maps; failing! W/PackageManager( 55): Package couldn't be installed in /data/app/com.android.fms.apk D/AndroidRuntime( 206): Shutting down VM It is possible I haven't set up the Maps API key correctly - when I got it using keytools, I didn't specify an alias_name, though this didn't seem to cause an error. Can anyone help?

    Read the article

  • NHibernate query against the key field of a dictionary (map)

    - by Carl Raymond
    I have an object model where a Calendar object has an IDictionary<MembershipUser, Perms> called UserPermissions, where MembershipUser is an object, and Perms is a simple enumeration. This is in the mapping file for Calendar as <map name="UserPermissions" table="CalendarUserPermissions" lazy="true" cascade="all"> <key column="CalendarID"/> <index-many-to-many class="MembershipUser" column="UserGUID" /> <element column="Permissions" type="CalendarPermission" not-null="true" /> </map> Now I want to execute a query to find all calendars for which a given user has some permission defined. The permission is irrelevant; I just want a list of the calendars where a given user is present as a key in the UserPermissions dictionary. I have the username property, not a MembershipUser object. How do I build that using QBC (or HQL)? Here's what I've tried: ISession session = SessionManager.CurrentSession; ICriteria calCrit = session.CreateCriteria<Calendar>(); ICriteria userCrit = calCrit.CreateCriteria("UserPermissions.indices"); userCrit.Add(Expression.Eq("Username", username)); return calCrit.List<Calendar>(); This constructed invalid SQL -- the WHERE clause contained WHERE membership1_.Username = @p0 as expected, but the FROM clause didn't include the MemberhipUsers table. Also, I really had to struggle to learn about the .indices notation. I found it by digging through the NHibernate source code, and saw that there's also .elements and some other dotted notations. Where's a reference to the allowed syntax of an association path? I feel like what's above is very close, and just missing something simple.

    Read the article

  • Paragraph with normal opacity within greyed-out div

    - by dmr
    I am greying out a web page when a user doesn't have permission to access it. In order to do that, I am placing a div with background-color white and a lowered opacity on top of the web page. I want to write some words in that div with the words having a normal opacity. As of now, the greyed out background is showing correctly. However, I can't seem to get the words to be a regular opacity. The derived styles on Firebug show the opacity on the words as normal, but it clearly isn't. What am I doing wrong? The HTML: <div class="noPermission"> <p>I'm sorry. You do not have permission to access this page.</p> </div> The CSS: div.noPermission { background-color: white; filter:alpha(opacity=50); /* IE */ opacity: 0.5; /* Safari, Opera */ -moz-opacity:0.50; /* FireFox */ z-index: 20; height: 100%; width: 100%; background-repeat:no-repeat; background-position:center; position:absolute; top: 0px; left: 0px; } div.noPermission p{ color: black; margin: 300px auto auto 50px; text-align: left; font-weight: bold; font-size: 18px; display: block; width: 250px; }

    Read the article

  • Snow Leopard mounted directory changes permissions sporadically

    - by Galen
    I have a smb mounted directory: /Volumes/myshare This was mounted via Finder "Connect to Server..." with smb://myservername/myshare Everything good so far. However, when I try to access the directory via PHP (running under Apache), it fails with permission denied about 10% of the time. By this I mean that repeated accesses to my page sometimes result in a failure. My PHP page looks like: <?php $cmd = "ls -la /Volumes/ 2>&1"; exec($cmd, $execOut, $exitCode); echo "<PRE>EXIT CODE = $exitCode<BR/>"; foreach($execOut as $line) { echo "$line <BR/>"; } echo "</PRE>"; ?> When it succeeds it looks like: EXIT CODE = 0 total 40 drwxrwxrwt@ 4 root admin 136 Jun 14 12:34 . drwxrwxr-t 30 root admin 1088 Jun 4 13:09 .. drwx------ 1 galen staff 16384 Jun 14 09:28 myshare lrwxr-xr-x 1 root admin 1 Jun 11 16:05 galenhd - / When it fails it looks like: EXIT CODE = 1 ls: myshare: Permission denied total 8 drwxrwxrwt@ 4 root admin 136 Jun 14 12:34 . drwxrwxr-t 30 root admin 1088 Jun 4 13:09 .. lrwxr-xr-x 1 root admin 1 Jun 11 16:05 galenhd - / OTHER INFO: I'm working with the PHP (5.3.1), and Apache server that comes out of the box with Snow Leopard. Also, if I write a PHP script that loops and retries the "ls -la.." from the command-line, it doesn't seem to fail. Nothing is changing about the code and/or filesystem between succeeds and fails, so this appears to be a truly intermittent failure. This is driving me crazy. Anyone have any idea what might be going on? Thanks, Galen

    Read the article

  • Sourcing a shell script, while running with sudo

    - by WishCow
    I would like to write a shell script that sets up a mercurial repository, and allow all users in the group "developers" to execute this script. The script is owned by the user "hg", and works fine when ran. The problem comes when I try to run it with another user, using sudo, the execution halts with a "permission denied" error, when it tries to source another file. The script file in question: create_repo.sh #!/bin/bash source colors.sh REPOROOT="/srv/repository/mercurial/" ... rest of the script .... Permissions of create_repo.sh, and colors.sh: -rwxr--r-- 1 hg hg 551 2011-01-07 10:20 colors.sh -rwxr--r-- 1 hg hg 1137 2011-01-07 11:08 create_repo.sh Sudoers setup: %developer ALL = (hg) NOPASSWD: /home/hg/scripts/create_repo.sh What I'm trying to run: user@nebu:~$ id uid=1000(user) gid=1000(user) groups=4(adm),20(dialout),24(cdrom),46(plugdev),105(lpadmin),113(sambashare),116(admin),1000(user),1001(developer) user@nebu:~$ sudo -l Matching Defaults entries for user on this host: env_reset User user may run the following commands on this host: (ALL) ALL (hg) NOPASSWD: /home/hg/scripts/create_repo.sh user@nebu:~$ sudo -u hg /home/hg/scripts/create_repo.sh /home/hg/scripts/create_repo.sh: line 3: colors.sh: Permission denied So the script is executed, but halts when it tries to include the other script. I have also tried using: user@nebu:~$ sudo -u hg /bin/bash /home/hg/scripts/create_repo.sh Which gives the same result. What is the correct way to include another shell script, if the script may be ran with a different user, through sudo?

    Read the article

  • XPath expression exception

    - by fftoolbar
    Hi I am not really sure if i am doing this right with XPath expression. I am trying to locate a text on DOM and this text is assingned to a variable. I have text stored in SQLite and i have retrievd the text and i am trying to locate it on the webpage which actually contains the text. so i ahve the following code: var searchText = dataset[x]['selectedText']; alert(dataset[x]['selectedText']); var res = googbar_frames[0].contentDocument.evaluate("//*[.=searchText]",googbar_frames[0].contentDocument.body,null,XPathResult.ANY_TYPE,null); alert(res.snapshotLength); And i get the following error. Error: Permission denied for <http://en.wikipedia.org> to call method XPathException.toString on <>. Error: Permission denied for <http://en.wikipedia.org> to call method XPathException.toString on <>. Have got the expression correct. I am trying to look for the text on DOM. Or am i going wrong somwehere? cheers

    Read the article

  • Licensing for the undecided

    - by Jasper
    I am creating a game in C++. Now I am not sure on how I will distribute it yet - though I am pretty sure that I won't be asking money for it. And I am looking into a licensing and I wondered if there is a license that is suited for the undecided like me. My current releases (which are really really early versions of the game, with far from full functionality) are executable only. However, I am actually thinking that I might release the source on an open source license. For now, I am the only contributor, so that would be no problem as I only need my own permission to move to a less restrictive license. However, when I allow other people to contribute, I would need all their permissions to do so (right?). So I was wondering if there is a license that let's me distribute the game executable only for now, but will let me switch to a less restrictive license if I want. Basically I need a license in which contributors give permission to switch to a less restrictive license up front. Does anybody know of license (or other construction) that would allow me to do so?

    Read the article

  • SharePoint Permissions: User with Contribute change cannot change a list item they did not create?

    - by antik
    I've build a custom SharePoint list that programatically adjusts permissions per list item. This part of the app works by clearing all permissions in the list item and adding permissions to the folks I want to grant Read or Contribute permission to. I believe this part of the application to be correct: selecting Manage Permissions on a list item I can see the appropriate users and roles for the list items in question in the Permissions list. However, I was surprised to realize that only the user who submitted a list item can successfully edit the item. I'll describe what I'm seeing with the following two users: UserA and UserB. UserA submitted the list item. UserB is trying to edit the same list item after the permissions have been assigned (either manually or programatically). UserB cannot edit the list item: UserB can see the Edit Item link on the item toolbar. UserB can click the link and will see EditForm.aspx. When UserB makes changes and presses submit, UserB encounters the out of box SharePoint "Access Denied" error page. The event handler for the list item update does not fire. Manually elevating UserB's permission to include Full Control does not affect the behavior above. By contrast, UserA encounters far more predictable behavior: UserA can see the Edit Item link on the item toolbar. UserA can click the link and will see EditForm.aspx. When UserA submits, the changes are persisted and the user is redirected back to the item list. Event Handlers fire after UserA submits. This leaves me with several questions: Is this an expected behavior for SharePoint that I managed to overlook? What can I do to allow UserB to modify the list item?

    Read the article

  • UnauthorizedAccessException when running desktop application from shared folder

    - by Atara
    I created a desktop application using VS 2008. When I run it locally, all works well. I shared my output folder (WITHOUT allowing network users to change my files) and ran my exe from another Vista computer on our intranet. When running the shared exe, I receive "System.UnauthorizedAccessException" when trying to read a file. How can I give permission to allow reading the file? Should I change the code? Should I grant permission to the application\folder on the Vista computer? how? Notes: I do not use ClickOnce. the application should be distributed using xcopy. My application target framework is ".Net Framework 2.0" On the Vista computer, "controlPanel | UninstallOrChangePrograms" it says it has "Microsoft .Net Framework 3.5 SP1" I also tried to map the folder drive, but got the same errors, only now the fileName is "T:\my.ocx" ' ---------------------------------------------------------------------- ' my code: Dim src As String = mcGlobals.cmcFiles.mcGetFileNameOcx() Dim ioStream As New System.IO.FileStream(src, IO.FileMode.Open) ' ---------------------------------------------------------------------- Public Shared Function mcGetFileNameOcx() As String ' ---------------------------------------------------------------------- Dim dirName As String = Application.StartupPath & "\" Dim sFiles() As String = System.IO.Directory.GetFiles(dirName, "*.ocx") Dim i As Integer For i = 0 To UBound(sFiles) Debug.WriteLine(System.IO.Path.GetFullPath(sFiles(i))) ' if found any - return the first: Return System.IO.Path.GetFullPath(sFiles(i)) Next Return "" End Function ' ---------------------------------------------------------------------- ' The Exception I receive: System.UnauthorizedAccessException: Access to the path '\\computerName\sharedFolderName\my.ocx' is denied. at System.IO._Error(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(...) at System.IO.FileStream..ctor(...) at System.IO.FileStream..ctor(String path, FileMode mode) ' ----------------------------------------------------------------------

    Read the article

  • Which is the best license for my Open Source project?

    - by coderex
    I am a web developer, and I don't have enough knowledge about software licenses. I wish to publish some of my works, and I need to select licenses for them. My software product is free of cost. But I have some restrictions on the distribution/modification of the code. It's free of cost (but donations are acceptable ;-)). The source code is freely available. You can use, customize or edit/remove code (as long as the basic nature of the software is not changed). You don't have any permission to change the product name. There are some libraries and classes which are in a folder caller "myname". You don't have the permission to rename "myname". You can contribute any additions or modifications to my project, to the original source repository (the contributors name/email/site link will be listed on the credit file). You can't remove the original author's name from the license. You can put the license file or license code anywhere in the project file or folder. You can redistribute this code as free or commercial software. :) Do you think all these restrictions are valid? Given these restrictions, which license should I use? Edit 1:- My main intention is to make the product more popular with free source code while ensuring the original author is not ignored. The product is open. Edit 2:- Thank you all, the above points are because of my lack of knowledge of license terms. You can help me to correct or remove some of the above points. What I'm basically looking for is in my Edit 1.

    Read the article

  • My treeview Data is Not changing.

    - by Vibin Jith
    Hai , I am trying to display the user permission in a treeview.For each user permissions are stored in the database as xml file. In the page, a Combo box used to list the users and a treeView used to bind the Permission xml. When the user get selected in the combo box , i took the xml from the database and connect with xmlDatasource and bind with the treeView. What happening is , First time the TreeView fill with the xml nodes and another time it will not work. For the first selection it's ok. Anothers selections are not effected by the treeview. The code is debugging. No problem. Can you just tell ,why the treeview datasource is not updating. I used this code .. Dim permissionRoot = From permissionNode In MyUser.UserPermissionXml.Root.Elements("menuNode") XmlTreeViewSource.Data = permissionRoot(0).ToString trvPermission.DataSource = XmlTreeViewSource trvPermission.DataBind() SetPermission(trvPermission.Nodes(0)) The markups <asp:TreeView ID="trvPermission" runat="server" ExpandDepth="2" ShowCheckBoxes="All" ShowLines="True" ForeColor="#005782" > <DataBindings> <asp:TreeNodeBinding DataMember="menuNode" TextField="title" ValueField="value" /> </DataBindings> </asp:TreeView>

    Read the article

  • Show content with fancybox like a Javascript Alert

    - by Ron Lens
    I try to show the content from a PHP-file in a fancybox but I can't handle it. Now it's the following situation: If a file permission problem occures a <div id="error"> is shown on the website. I'd like to have the content from <div id="error"> in fancybox. Everything I try I get the notice "The requested content cannot be loaded. Please try again later." That means the fancybox, it the file permission error occures, should be shown when the page is loading and not like usual shown when some events like click or mouseover. For example, if the error exists, the following content should be shown in the fancybox: <div style="width:100px; height:100px; background:#f00;"> <p>Failure</p> </div> This snippet is located in a file security_check.php. Now there are two possibilities. The 1st is to load the security_check.php directly into the fancybox or to put in the mentioned above snippet. So: how to load file contents into the fancybox?

    Read the article

  • Visual SourceSafe (VSS): "Access to file (filename) denied" error

    - by tk-421
    Hi, can anybody help with the above SourceSafe error? I've spent hours trying to find a fix. I've also Googled the heck out of it but couldn't find a scenario matching mine, because in my case only a few files (not all) are affected. Here's what I found: only a few files in my project generate this error other files in the same directory (for example, App_Code has one of the problem files) work fine I've tried checking out from both the VSS client and Visual Studio another developer can check out the main problem file without any problems This sounds like a permission issue for my user, right? However: I found the location of one of the problem files in VSS's data directory (using VSS's naming format, as in 'fddaaaaa.a') and checked its permissions; everything looks fine and its permissions match those of other files I can check out successfully I can see no differences in the file properties between working and non-working files What else can I check? Has anyone encountered this problem before and found a solution? Thanks. P.S.: SourceGear, svn or git are not options, unfortunately. P.P.S.: Tried unsuccessfully to add tag "sourcesafe." EDIT: Hey Paddy, I tried to click 'add comment' to respond to your comment, but I'm getting a javascript error when loading this page in IE8 ("jquery undefined," etc.) so this isn't working. This is when checking out files, and yes, I've obliterated my local copy more times than I can remember. ;) EDIT 2: Thanks for the responses, guys (again I can't 'add comment' due to jQuery not loading, maybe blocked as discussed in Meta). If the problem was caused by antivirus or a bad disk, would other users still be able to check out the file(s)? That's the case here, which makes me think it's a permission issue specific to my account. However I've looked at the permissions and they match both other users' settings and settings on other files which I can check out.

    Read the article

  • before filter not working as expected

    - by Jimmy
    Hey guys I have a ruby on rails app with a before filter setup in my application controller to ensure only the owner can edit a document, but my permission check is always failing even when it shouldn't. Here is the code: def get_logged_in_user id = session[:user_id] unless id.nil? @current_user = User.find(id) end end def require_login get_logged_in_user if @current_user.nil? session[:original_uri] = request.request_uri flash[:notice] = "You must login first." redirect_to login end end def check_current_user_permission require_login logger.debug "user id is #{params[:user_id]}" logger.debug "current user id is #{session[:user_id]}" if session[:user_id] != params[:user_id] flash[:notice] = "You don't have permission to do that." redirect_to :controller => 'home' end end The code to note is in the check_current_user_permission. Here is an example of my log output: user id is 3 current user id is 3 Redirected to http://localhost:3000/home Filter chain halted as [:check_current_user_permission] rendered_or_redirected. Can anyone shed some light into why this is failing? Obviously the user_id of 3 is equal to the session's user_id of 3. What is going wrong?

    Read the article

  • Using git svn with some awkward permissions

    - by Migs
    Due to some funky permissions on our client's side that we can't change, we have a project whose hierarchy looks something like: projectname/trunk: foo/, bar/, baz/ projectname/branches: branch1/, branch2/ (where branch1 and branch2 each contain foo, bar, and baz.) The thing is, I have no permission to access trunk, so I can't just do a clone of project/trunk. I do have permission to access branches. What I am currently doing is checking out each subdirectory individually via git svn clone, so that each one has their own git repo. I use a script to update/commit them all, but what I would prefer to do is to check them all out under a single repo, and be able to commit changes with a single call to git svn dcommit. Is this possible? I mentioned the branches hierarchy because if possible, I'd also like to be able to track the branches the way I could if the permissions were more sane. I've tried permuting a lot of options that sounded useful, but I haven't found one that gives me exactly what I want. I sense that the solution may have something to do with --no-minimize-url, but I'm not even sure about that, as it didn't help me when I tried it.

    Read the article

  • Could not launch console app with xCode 4.4

    - by lp1756
    I have a project with two targets -- an iOS app and an OSX console app. The latter was created using Xcode File-New Target and selecting "Command Line Tool". This console app is used to prep a default database needed by the iOS app -- using CoreData. This has been working fine until I upgraded to Mountain Lion and xCode 4.4. Now when I try to run the command line tool I get a "Could Not Launch -- permission denied" error. I have tried playing around with signing certificates, to no avail. Interestingly if I create a new "hello, world" command line tool in a new project it works just fine -- and it is not signed at all. I checked the file and it has -rwxr-xr-x permission. In the debugger the app fails on startup even before it tries to access the moms. If I try to run this outside of the debugger at the command line, it ends with a kill 9 message. Any ideas would be greatly appreciated.

    Read the article

  • How to differentiate between exceptions i can show the user, and ones i can't?

    - by Ian Boyd
    i have some business logic that traps some logically invalid situations, e.g. trying to reverse a transaction that was already reversed. In this case the correct action is to inform the user: Transaction already reversed or Cannot reverse a reversing transaction or You do not have permission to reverse transactions or This transaction is on a session that has already been closed or This transaction is too old to be reversed The question is, how do i communicate these exceptional cases back to the calling code, so they can show the user? Do i create a separate exception for each case: catch (ETransactionAlreadyReversedException) MessageBox.Show('Transaction already reversed') catch (EReversingAReversingTransactionException) MessageBox.Show('Cannot reverse a reversing transaction') catch (ENoPermissionToReverseTranasctionException) MessageBox.Show('You do not have permission to reverse transactions') catch (ECannotReverseTransactionOnAlredyClosedSessionException) MessageBox.Show('This transaction is on a session that has already been closed') catch (ECannotReverseTooOldTransactionException) MessageBox.Show('This transaction is too old to be reversed') Downside for this is that when there's a new logical case to show the user: Tranasctions created by NSL cannot be reversed i don't simply show the user a message, and instead it leaks out as an unhandled excpetion, when really it should be handled with another MessageBox. The alternative is to create a single exception class: `EReverseTransactionException` With the understanding that any exception of this type is a logical check, that should be handled with a message box: catch (EReverseTransactionException) But it's still understood that any other exceptions, ones that involve, for example, an memory ECC parity error, continue unhandled. In other words, i don't convert all errors that can be thrown by the ReverseTransaction() method into EReverseTransactionException, only ones that are logically invalid cause of the user.

    Read the article

  • Which is the best license for Open Source project?

    - by coderex
    Hi friends, I am a web developer, and i don't have enough knowledge in software licenses. I wish to publish some of my works. and i need to apply a licenses for that. My software/product is free of cost. But I have some restrictions on the distribution/Modification. Its free of cost.(but donations are acceptable ;-)) Source Code is freely available; that you can use, customize or edit/remove(but don't deviate the basic nature of the software). You don't have any permission to change the product name. There are some lib or class are and which is put into a folder caller "myname", you don't have the permission to rename "myname". You can contribute any additions modifications to my project, to the original source repository. (The contributors name/email/site link will be listed on the credit file). Don't remove the original author's name from the license. Put the license file or license code any where is in the project file or folder. You can redistribute this code as free or commercial. :) What you this, all these kinda restrictions are valid or ... ? For this, which license i want to use.

    Read the article

  • How to map this class in NHibernate (not FluentNHibernate)?

    - by JMSA
    Suppose I have a database like this: This is set up to give role-wise menu permissions. Please note that, User-table has no direct relationship with Permission-table. Then how should I map this class against the database-tables? class User { public int ID { get; set; } public string Name { get; set; } public string Username { get; set; } public string Password { get; set; } public bool? IsActive { get; set; } public IList<Role> RoleItems { get; set; } public IList<Permission> PermissionItems { get; set; } public IList<string> MenuItemKeys { get; set; } } This means, (1) Every user has some Roles. (2) Every user has some Permissions (depending on to Roles). (3) Every user has some permitted MenuItemKeys (according to Permissions). How should my User.hbm.xml look like?

    Read the article

< Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >